]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: gate test_child_create on sys/prctl.h
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 13 May 2026 13:48:34 +0000 (15:48 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Thu, 14 May 2026 11:19:43 +0000 (13:19 +0200)
The target needs this header, encode this in the build system.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
meson.build

index c899a281a738a12b3824bed40c554556b98ea6a4..e79a9eef60ab3f8103d4d677e4cbb90795690488 100644 (file)
@@ -4090,13 +4090,14 @@ if not is_disabler(exe)
   exes += exe
 endif
 
+opt = conf.get('HAVE_SYS_PRCTL_H').to_string() == '1'
 exe = executable(
   'test_child_create',
   'tests/helpers/test_child_create.c',
   include_directories : includes,
   link_with : lib_common,
-  build_by_default: program_tests)
-if not is_disabler(exe)
+  build_by_default: opt and program_tests )
+if opt and not is_disabler(exe)
   exes += exe
 endif