From: Karel Zak Date: Tue, 4 Mar 2025 10:44:16 +0000 (+0100) Subject: test_mkfds: remove local pidfd_open() fallback X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3664cacaafa4834b0b7702da9e4df0aef9700263;p=thirdparty%2Futil-linux.git test_mkfds: remove local pidfd_open() fallback Signed-off-by: Karel Zak --- diff --git a/tests/helpers/test_mkfds.c b/tests/helpers/test_mkfds.c index 2a9bc5c49..82f7a794e 100644 --- a/tests/helpers/test_mkfds.c +++ b/tests/helpers/test_mkfds.c @@ -21,6 +21,7 @@ #include "xalloc.h" #include "test_mkfds.h" #include "exitcodes.h" +#include "pidfd-utils.h" #include #include @@ -81,7 +82,6 @@ #define _U_ __attribute__((__unused__)) -static int pidfd_open(pid_t pid, unsigned int flags); static void do_nothing(int signum _U_); static void __attribute__((__noreturn__)) usage(FILE *out, int status) @@ -4410,22 +4410,6 @@ static void do_nothing(int signum _U_) { } -#ifdef __NR_pidfd_open - -static int -pidfd_open(pid_t pid, unsigned int flags) -{ - return syscall(__NR_pidfd_open, pid, flags); -} -#else -static int -pidfd_open(pid_t pid _U_, unsigned int flags _U_) -{ - errno = ENOSYS; - return -1; -} -#endif - /* * Multiplexers */