]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: build test_child_create only with prctl.h
authorWanBingjiang <614699596@qq.com>
Wed, 1 Jul 2026 02:13:48 +0000 (10:13 +0800)
committerWanBingjiang <wanbingjiang@webray.com.cn>
Wed, 1 Jul 2026 02:15:10 +0000 (10:15 +0800)
Aligned to Meson fix: 1dd0fd9

Signed-off-by: WanBingjiang <wanbingjiang@webray.com.cn>
configure.ac
tests/helpers/Makemodule.am

index 9dd5721a9e9975c4b3b2e9b7130500a967b99536..4b5f1be0a02611a1a99e7894c35ab74d2ca6470c 100644 (file)
@@ -701,6 +701,7 @@ AC_CHECK_FUNCS([updwtmpx updwtmpx], [have_gnu_utmpx=yes], [have_gnu_utmpx=no])
 AC_CHECK_FUNCS([statx], [have_statx=yes], [have_statx=no])
 
 AM_CONDITIONAL([HAVE_OPENAT], [test "x$have_openat" = xyes])
+AM_CONDITIONAL([HAVE_SYS_PRCTL_H], [test "x$ac_cv_header_sys_prctl_h" = xyes])
 AM_CONDITIONAL([HAVE_LINUX_LANDLOCK_H], [test "x$ac_cv_header_linux_landlock_h" = xyes])
 
 have_setns_syscall="yes"
index e12784968c93add3e41775250c0d1dcf20b543b2..5b0f0b706dba0bd8d44898130e0a972b8ec14608 100644 (file)
@@ -70,6 +70,8 @@ check_PROGRAMS += test_threads_create
 test_threads_create_SOURCES = tests/helpers/test_threads_create.c
 test_threads_create_LDADD =  $(LDADD) libcommon.la $(PTHREAD_LIBS)
 
+if HAVE_SYS_PRCTL_H
 check_PROGRAMS += test_child_create
 test_child_create_SOURCES = tests/helpers/test_child_create.c
 test_child_create_LDADD = $(LDADD) libcommon.la
+endif