From 2806759b5ae54787c78ff3a32f21a32abf2aae7a Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Thu, 18 May 2023 18:56:15 +0200 Subject: [PATCH] build-sys: add --disable-waitpid The new pidfd stuff waitpid uses is not compatible with older kernel headers, but the rest of the util-linux is still perfectly fine, so allow disabling just the waitpid utility to make the builds happy again. --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 591b62e353..6b1e5eb4ab 100644 --- a/configure.ac +++ b/configure.ac @@ -1858,7 +1858,11 @@ UL_BUILD_INIT([fadvise], [check]) UL_REQUIRES_LINUX([fadvise]) AM_CONDITIONAL([BUILD_FADVISE], [test "x$build_fadvise" = xyes]) -UL_BUILD_INIT([waitpid], [check]) +AC_ARG_ENABLE([waitpid], + AS_HELP_STRING([--disable-waitpid], [do not build waitpid]), + [], [UL_DEFAULT_ENABLE([waitpidd], [check])] +) +UL_BUILD_INIT([waitpid]) UL_REQUIRES_LINUX([waitpid]) UL_REQUIRES_SYSCALL_CHECK([waitpid], [UL_CHECK_SYSCALL([pidfd_open])], [pidfd_open]) AM_CONDITIONAL([BUILD_WAITPID], [test "x$build_waitpid" = xyes]) -- 2.47.3