]> git.ipfire.org Git - thirdparty/util-linux.git/commit
login,libblkid: use econf_readConfig rather than deprecated econf_readDirs
authorKarel Zak <kzak@redhat.com>
Thu, 21 Nov 2024 09:24:07 +0000 (10:24 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 21 Nov 2024 12:16:53 +0000 (13:16 +0100)
commit830d73c36af08d967c8a7d064aa88068c6d91c36
tree42ff0ab53f9f760d75af60da4d92ef1919ca621d
parent23a4dc0a35ec9d77653dfca509210ee6bb4c96e6
login,libblkid: use econf_readConfig rather than deprecated econf_readDirs

Fixes:

lib/logindefs.c: In function ‘load_defaults’:
lib/logindefs.c:257:9: warning: ‘econf_readDirs’ is deprecated: Use the econf_readConfig/econf_readConfigWithCallback instead [-Wdeprecated-declarations]
  257 |         error = econf_readDirs(&file,
      |         ^~~~~

libblkid/src/config.c: In function 'blkid_read_config':
libblkid/src/config.c:164:17: error: 'econf_readDirs' is deprecated: Use the econf_readConfig/econf_readConfigWithCallback instead [-Werror=deprecated-declarations]
  164 |                 error = econf_readDirs(&file,
      |                 ^~~~~

* check for econf_readConfig() by ./configure and moson

* add UL_VENDORDIR_PATH into pathnames.h to avoid #ifdef in code

* use #ifdef HAVE_ECONF_READCONFIG to switch between econf_readDirs()
  and the econf_readConfig()

Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
include/pathnames.h
lib/logindefs.c
libblkid/src/config.c
meson.build