]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
include: cleanup pidfd inckudes
authorKarel Zak <kzak@redhat.com>
Tue, 10 Mar 2020 10:43:16 +0000 (11:43 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 10 Mar 2020 11:32:36 +0000 (12:32 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
include/pidfd-utils.h

index 0baedd2c90d58359c81d48e4835382f5d9343762..4a6c3a604436ce0d77138f21536c7dbc2b698d46 100644 (file)
@@ -3,10 +3,10 @@
 
 #if defined(__linux__)
 # include <sys/syscall.h>
-# if defined(SYS_pidfd_send_signal)
+# if defined(SYS_pidfd_send_signal) && defined(SYS_pidfd_open)
 #  include <sys/types.h>
 
-#  ifndef HAVE_PIDFD_OPEN
+#  ifndef HAVE_PIDFD_SEND_SIGNAL
 static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
                                    unsigned int flags)
 {
@@ -14,7 +14,7 @@ static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
 }
 #  endif
 
-#  ifndef HAVE_PIDFD_SEND_SIGNAL
+#  ifndef HAVE_PIDFD_OPEN
 static inline int pidfd_open(pid_t pid, unsigned int flags)
 {
        return syscall(SYS_pidfd_open, pid, flags);