0007-include-cleanup-pidfd-inckudes.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 0a4035ff2e4fd5b5ae0cf8f8665696c2aff53b75 Mon Sep 17 00:00:00 2001
  2. From: Karel Zak <kzak@redhat.com>
  3. Date: Tue, 10 Mar 2020 11:43:16 +0100
  4. Subject: [PATCH] include: cleanup pidfd inckudes
  5. Signed-off-by: Karel Zak <kzak@redhat.com>
  6. Signed-off-by: Carlos Santos <unixmania@gmail.com>
  7. ---
  8. include/pidfd-utils.h | 6 +++---
  9. 1 file changed, 3 insertions(+), 3 deletions(-)
  10. diff --git a/include/pidfd-utils.h b/include/pidfd-utils.h
  11. index 0baedd2c9..4a6c3a604 100644
  12. --- a/include/pidfd-utils.h
  13. +++ b/include/pidfd-utils.h
  14. @@ -3,10 +3,10 @@
  15. #if defined(__linux__)
  16. # include <sys/syscall.h>
  17. -# if defined(SYS_pidfd_send_signal)
  18. +# if defined(SYS_pidfd_send_signal) && defined(SYS_pidfd_open)
  19. # include <sys/types.h>
  20. -# ifndef HAVE_PIDFD_OPEN
  21. +# ifndef HAVE_PIDFD_SEND_SIGNAL
  22. static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
  23. unsigned int flags)
  24. {
  25. @@ -14,7 +14,7 @@ static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
  26. }
  27. # endif
  28. -# ifndef HAVE_PIDFD_SEND_SIGNAL
  29. +# ifndef HAVE_PIDFD_OPEN
  30. static inline int pidfd_open(pid_t pid, unsigned int flags)
  31. {
  32. return syscall(SYS_pidfd_open, pid, flags);
  33. --
  34. 2.18.2