]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Merge branch 'misc/fixes' of https://github.com/t-8ch/util-linux
authorKarel Zak <kzak@redhat.com>
Mon, 23 Oct 2023 10:29:50 +0000 (12:29 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 23 Oct 2023 10:29:50 +0000 (12:29 +0200)
* 'misc/fixes' of https://github.com/t-8ch/util-linux:
  meson: don't try to build test_ca without libcap-ng
  blkpr: store return value of getopt_long in int

1  2 
meson.build

diff --combined meson.build
index 5f73e9846e1b35eb0c19cd2c448a1f72ff27b54d,aaaddbe51e841acfc218ac485aa53967ae347471..5c59c4400cc20cc0fa0f40fc36a2d8b39913183b
@@@ -377,6 -377,9 +377,9 @@@ conf.set('HAVE_CRYPT_ACTIVATE_BY_SIGNED
  lib_cap_ng = dependency(
    'libcap-ng',
    required : get_option('build-setpriv'))
+ if not lib_cap_ng.found()
+   lib_cap_ng = disabler()
+ endif
  
  lib_selinux = dependency(
    'libselinux',
@@@ -731,8 -734,7 +734,8 @@@ int main(void) 
  have = cc.compiles(code, name : 'using __progname')
  conf.set('HAVE___PROGNAME', have ? 1 : false)
  
 -have = conf.get('HAVE_PTY_H') != false and conf.get('HAVE_SYS_SIGNALFD_H') != false
 +have = conf.get('HAVE_PTY_H').to_string() == '1' \
 +       and conf.get('HAVE_SYS_SIGNALFD_H').to_string() == '1'
  conf.set('HAVE_PTY', have ? 1 : false)
  
  have_opal_get_status= cc.has_header_symbol('linux/sed-opal.h', 'IOC_OPAL_GET_STATUS')
@@@ -2919,7 -2921,7 +2922,7 @@@ if not is_disabler(exe
    bashcompletions += ['fadvise']
  endif
  
 -if LINUX and conf.get('HAVE_PIDFD_OPEN') != false
 +if LINUX and conf.get('HAVE_PIDFD_OPEN').to_string() == '1'
    exe = executable(
      'waitpid',
      waitpid_sources,
@@@ -3081,8 -3083,7 +3084,8 @@@ exe = executable
    build_by_default: program_tests)
  exes += exe
  
 -if conf.get('HAVE_OPENAT') != false and conf.get('HAVE_DIRFD') != false
 +if conf.get('HAVE_OPENAT').to_string() == '1' \
 +   and conf.get('HAVE_DIRFD').to_string() == '1'
    exe = executable(
      'test_procfs',
      'lib/procfs.c',
    exes += exe
  endif
  
 -if conf.get('HAVE_PTY') != false
 +if conf.get('HAVE_PTY').to_string() == '1'
    exe = executable(
      'test_pty',
      pty_session_c,
@@@ -3318,7 -3319,9 +3321,9 @@@ exe = executable
    include_directories : includes,
    dependencies : [lib_cap_ng],
    build_by_default: program_tests)
- exes += exe
+ if not is_disabler(exe)
+   exes += exe
+ endif
  
  exe = executable(
    'test_mbsencode',
@@@ -3418,7 -3421,7 +3423,7 @@@ exes += ex
  
  ############################################################
  
 -if conf.get('HAVE_OPENAT') != false
 +if conf.get('HAVE_OPENAT').to_string() == '1'
    exe = executable(
      'sample-scols-tree',
      'libsmartcols/samples/tree.c',