| ... | @@ -21,6 +21,9 @@ | ... | @@ -21,6 +21,9 @@ |
| 21 | #include <fcntl.h> | 21 | #include <fcntl.h> |
| 22 | #include <bits/types/siginfo_t.h> | 22 | #include <bits/types/siginfo_t.h> |
| 23 | | 23 | |
| | 24 | // zig patch: check target glibc version |
| | 25 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 36) || __GLIBC__ > 2 |
| | 26 | |
| 24 | #define PIDFD_NONBLOCK O_NONBLOCK | 27 | #define PIDFD_NONBLOCK O_NONBLOCK |
| 25 | #define PIDFD_THREAD O_EXCL | 28 | #define PIDFD_THREAD O_EXCL |
| 26 | | 29 | |
| ... | @@ -45,8 +48,15 @@ extern int pidfd_getfd (int __pidfd, int __targetfd, | ... | @@ -45,8 +48,15 @@ extern int pidfd_getfd (int __pidfd, int __targetfd, |
| 45 | extern int pidfd_send_signal (int __pidfd, int __sig, siginfo_t *__info, | 48 | extern int pidfd_send_signal (int __pidfd, int __sig, siginfo_t *__info, |
| 46 | 			 unsigned int __flags) __THROW; | 49 | 			 unsigned int __flags) __THROW; |
| 47 | | 50 | |
| | 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 | |
| 48 | /* Query the process ID (PID) from process descriptor FD. Return the PID | 56 | /* Query the process ID (PID) from process descriptor FD. Return the PID |
| 49 | or -1 in case of an error. */ | 57 | or -1 in case of an error. */ |
| 50 | extern pid_t pidfd_getpid (int __fd) __THROW; | 58 | extern pid_t pidfd_getpid (int __fd) __THROW; |
| 51 | | 59 | |
| 52 | #endif /* _PIDFD_H */ | | |
| \ No newline at end of file |
| | 60 | #endif /* (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 36) || __GLIBC__ > 2 */ |
| | 61 | |
| | 62 | #endif /* _PIDFD_H */ |