0005-pgrep-Include-sys-syscall.h-if-making-pidwait.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From 81ded587d2484b6f470f2d5c837c5591491377ce Mon Sep 17 00:00:00 2001
  2. From: Craig Small <csmall@dropbear.xyz>
  3. Date: Thu, 28 Nov 2024 07:20:42 +1100
  4. Subject: [PATCH] pgrep: Include sys/syscall.h if making pidwait
  5. sys/syscall.h would only be included if pidwait was made
  6. and we found pidfd_open() The previous commit fixed the
  7. finding part, but in fact we want sys/syscall.h either
  8. way because syscall() is defined there too.
  9. Most of the time the header is included by other headers
  10. but adding it explicitly means if that header is removed or
  11. changed it still works.
  12. Signed-off-by: Craig Small <csmall@dropbear.xyz>
  13. Upstream: https://gitlab.com/procps-ng/procps/-/commit/5acbb5dc1587d688de646d739a97251eb893bbb0
  14. Signed-off-by: Scott Fan <fancp2007@gmail.com>
  15. [Scott: backported to version 4.0.4]
  16. ---
  17. src/pgrep.c | 2 --
  18. 1 file changed, 2 deletions(-)
  19. diff --git a/src/pgrep.c b/src/pgrep.c
  20. index d8e57dff..a2607532 100644
  21. --- a/src/pgrep.c
  22. +++ b/src/pgrep.c
  23. @@ -44,9 +44,7 @@
  24. #ifdef ENABLE_PIDWAIT
  25. #include <sys/epoll.h>
  26. -#ifndef HAVE_PIDFD_OPEN
  27. #include <sys/syscall.h>
  28. -#endif /* !HAVE_PIDFD_OPEN */
  29. #endif
  30. /* EXIT_SUCCESS is 0 */
  31. --
  32. 2.43.0