authorgravatar for hugo.beauzee@datadoghq.comHugo Beauzée-Luyssen <hugo.beauzee@datadoghq.com> 2025-02-05 14:24:09+01:00
committergravatar for hugo.beauzee@datadoghq.comHugo Beauzée-Luyssen <hugo.beauzee@datadoghq.com> 2025-02-06 18:00:44+01:00
log9d85c79f2f09c3db578cc145392099d901986eb4
treed24774235b57941fee02f9d2c526ea8c60b45f9d
parente716d135557106410cdd46f01b865eaab3938fd5
signaturebadge-check Signed by SSH key SHA256:f/PN3KBuYCphTMxWTpJsH2vSjX3SRGCBksBuY/gCq10

generic glibc: guard pidfd function declarations

They were introduced in 2.36 & 2.39

1 files changed, 11 insertions(+), 1 deletions(-)

  • folderlib
lib/libc/include/generic-glibc/sys/pidfd.h+11-1
......@@ -21,6 +21,9 @@
2121#include <fcntl.h>
2222#include <bits/types/siginfo_t.h>
2323
24// zig patch: check target glibc version
25#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 36) || __GLIBC__ > 2
26
2427#define PIDFD_NONBLOCK O_NONBLOCK
2528#define PIDFD_THREAD O_EXCL
2629
......@@ -45,8 +48,15 @@ extern int pidfd_getfd (int __pidfd, int __targetfd,
4548extern int pidfd_send_signal (int __pidfd, int __sig, siginfo_t *__info,
4649 unsigned int __flags) __THROW;
4750
51#endif /* (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 36) || __GLIBC__ > 2 */
52
53// zig patch: check target glibc version
54#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 39) || __GLIBC__ > 2
55
4856/* Query the process ID (PID) from process descriptor FD. Return the PID
4957 or -1 in case of an error. */
5058extern pid_t pidfd_getpid (int __fd) __THROW;
5159
52#endif /* _PIDFD_H */
\ No newline at end of file
60#endif /* (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 36) || __GLIBC__ > 2 */
61
62#endif /* _PIDFD_H */