authorgravatar for hugo.beauzee@datadoghq.comHugo Beauzée-Luyssen <hugo.beauzee@datadoghq.com> 2025-02-06 10:00:48+01:00
committergravatar for hugo.beauzee@datadoghq.comHugo Beauzée-Luyssen <hugo.beauzee@datadoghq.com> 2025-02-06 18:00:45+01:00
logedee702a7fb48859d3bc58628617646439fc066f
tree538f7598b20fe5d82c63126bacecd09f81e30cf4
parent9d85c79f2f09c3db578cc145392099d901986eb4
signaturebadge-check Signed by SSH key SHA256:f/PN3KBuYCphTMxWTpJsH2vSjX3SRGCBksBuY/gCq10

generic glibc: guard pidfd_spawn(p) declarations


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

lib/libc/include/generic-glibc/bits/spawn_ext.h+4-1
...@@ -35,6 +35,8 @@ extern int posix_spawnattr_setcgroup_np (posix_spawnattr_t *__attr,...@@ -35,6 +35,8 @@ extern int posix_spawnattr_setcgroup_np (posix_spawnattr_t *__attr,
35 int __cgroup)35 int __cgroup)
36 __THROW __nonnull ((1));36 __THROW __nonnull ((1));
3737
38// zig patch: check target glibc version
39#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 39) || __GLIBC__ > 2
38/* Spawn a new process executing PATH with the attributes describes in *ATTRP.40/* Spawn a new process executing PATH with the attributes describes in *ATTRP.
39 Before running the process perform the actions described in FACTS. Return41 Before running the process perform the actions described in FACTS. Return
40 a PID file descriptor in PIDFD if process creation was successful and the42 a PID file descriptor in PIDFD if process creation was successful and the
...@@ -61,7 +63,8 @@ extern int pidfd_spawnp (int *__restrict __pidfd,...@@ -61,7 +63,8 @@ extern int pidfd_spawnp (int *__restrict __pidfd,
61 char *const __argv[__restrict_arr],63 char *const __argv[__restrict_arr],
62 char *const __envp[__restrict_arr])64 char *const __envp[__restrict_arr])
63 __nonnull ((1, 2, 5));65 __nonnull ((1, 2, 5));
66#endif /* (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 39) || __GLIBC__ > 2 */
6467
65#endif /* __USE_MISC */68#endif /* __USE_MISC */
6669
67__END_DECLS
\ No newline at end of file
70__END_DECLS