]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: conditionalize waitpid
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 13 Jun 2023 08:15:39 +0000 (10:15 +0200)
committerChristian Hesse <mail@eworm.de>
Wed, 14 Jun 2023 10:18:58 +0000 (12:18 +0200)
I *think* this mirros what configure.ac does, except that the configuration
option is not implemented.

(cherry picked from commit 334939a19d72febc0ce6f2913a9692123db79058)

meson.build

index 42ca4f4b625fae5c206baca237bd5f3a53145717..8b053f82116277c10a7e50b9cafdda8d8e55075b 100644 (file)
@@ -2859,18 +2859,19 @@ if not is_disabler(exe)
   bashcompletions += ['fadvise']
 endif
 
-# XXX: HAVE_PIDFD_OPEN
-exe = executable(
-  'waitpid',
-  waitpid_sources,
-  include_directories : includes,
-  link_with : [lib_common],
-  install_dir : usrbin_exec_dir,
-  install : true)
-if not is_disabler(exe)
-  exes += exe
-  manadocs += ['misc-utils/waitpid.1.adoc']
-  bashcompletions += ['waitpid']
+if LINUX and conf.get('HAVE_PIDFD_OPEN') != false
+  exe = executable(
+    'waitpid',
+    waitpid_sources,
+    include_directories : includes,
+    link_with : [lib_common],
+    install_dir : usrbin_exec_dir,
+    install : true)
+  if not is_disabler(exe)
+    exes += exe
+    manadocs += ['misc-utils/waitpid.1.adoc']
+    bashcompletions += ['waitpid']
+  endif
 endif
 
 ############################################################