]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
test_mkfds: remove local pidfd_open() fallback
authorKarel Zak <kzak@redhat.com>
Tue, 4 Mar 2025 10:44:16 +0000 (11:44 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 4 Mar 2025 10:44:16 +0000 (11:44 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/helpers/test_mkfds.c

index 2a9bc5c49dd91aa88ec2d9afd363d8774848ee8d..82f7a794eb29d66e872e2f4210e1e079d1fd8adb 100644 (file)
@@ -21,6 +21,7 @@
 #include "xalloc.h"
 #include "test_mkfds.h"
 #include "exitcodes.h"
+#include "pidfd-utils.h"
 
 #include <arpa/inet.h>
 #include <ctype.h>
@@ -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
  */