| author | |
| committer | |
| log | 8ad0732954df80f0f9a0248525c2bded7e82ba27 |
| tree | 88e22b0a3f7d3a68c0659ee7d2e4655c068cb289 |
| parent | 2d4954ad6345b4b52fc48ef11195068898627148 |
| parent | edee702a7fb48859d3bc58628617646439fc066f |
| signature |
glibc: guard more function declarations5 files changed, 34 insertions(+), 5 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 | 35 | 					 int __cgroup) |
| 36 | 36 | __THROW __nonnull ((1)); |
| 37 | 37 | |
| 38 | // zig patch: check target glibc version | |
| 39 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 39) || __GLIBC__ > 2 | |
| 38 | 40 | /* Spawn a new process executing PATH with the attributes describes in *ATTRP. |
| 39 | 41 | Before running the process perform the actions described in FACTS. Return |
| 40 | 42 | 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 | 63 | 			 char *const __argv[__restrict_arr], |
| 62 | 64 | 			 char *const __envp[__restrict_arr]) |
| 63 | 65 | __nonnull ((1, 2, 5)); |
| 66 | #endif /* (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 39) || __GLIBC__ > 2 */ | |
| 64 | 67 | |
| 65 | 68 | #endif /* __USE_MISC */ |
| 66 | 69 | |
| 67 | __END_DECLS | |
| \ No newline at end of file | ||
| 70 | __END_DECLS |
lib/libc/include/generic-glibc/bits/statx-generic.h+6-1| ... | ... | @@ -25,6 +25,9 @@ |
| 25 | 25 | #include <bits/types/struct_statx_timestamp.h> |
| 26 | 26 | #include <bits/types/struct_statx.h> |
| 27 | 27 | |
| 28 | // zig patch: check target glibc version | |
| 29 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 28) || __GLIBC__ > 2 | |
| 30 | ||
| 28 | 31 | #ifndef STATX_TYPE |
| 29 | 32 | # define STATX_TYPE 0x0001U |
| 30 | 33 | # define STATX_MODE 0x0002U |
| ... | ... | @@ -63,4 +66,6 @@ int statx (int __dirfd, const char *__restrict __path, int __flags, |
| 63 | 66 | unsigned int __mask, struct statx *__restrict __buf) |
| 64 | 67 | __THROW __nonnull ((2, 5)); |
| 65 | 68 | |
| 66 | __END_DECLS | |
| \ No newline at end of file | ||
| 69 | __END_DECLS | |
| 70 | ||
| 71 | #endif /* (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 28) || __GLIBC__ > 2 */ |
lib/libc/include/generic-glibc/sys/mount.h+9-1| ... | ... | @@ -235,6 +235,8 @@ struct mount_attr |
| 235 | 235 | #define FSPICK_NO_AUTOMOUNT 0x00000004 |
| 236 | 236 | #define FSPICK_EMPTY_PATH 0x00000008 |
| 237 | 237 | |
| 238 | // zig patch: check target glibc version | |
| 239 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 36) || __GLIBC__ > 2 | |
| 238 | 240 | |
| 239 | 241 | #ifndef FSOPEN_CLOEXEC |
| 240 | 242 | /* The type of fsconfig call made. */ |
| ... | ... | @@ -268,6 +270,7 @@ enum fsconfig_command |
| 268 | 270 | #define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */ |
| 269 | 271 | #define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */ |
| 270 | 272 | |
| 273 | #endif | |
| 271 | 274 | |
| 272 | 275 | __BEGIN_DECLS |
| 273 | 276 | |
| ... | ... | @@ -282,6 +285,9 @@ extern int umount (const char *__special_file) __THROW; |
| 282 | 285 | /* Unmount a filesystem. Force unmounting if FLAGS is set to MNT_FORCE. */ |
| 283 | 286 | extern int umount2 (const char *__special_file, int __flags) __THROW; |
| 284 | 287 | |
| 288 | // zig patch: check target glibc version | |
| 289 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 36) || __GLIBC__ > 2 | |
| 290 | ||
| 285 | 291 | /* Open the filesystem referenced by FS_NAME so it can be configured for |
| 286 | 292 | mouting. */ |
| 287 | 293 | extern int fsopen (const char *__fs_name, unsigned int __flags) __THROW; |
| ... | ... | @@ -320,6 +326,8 @@ extern int mount_setattr (int __dfd, const char *__path, unsigned int __flags, |
| 320 | 326 | 			 struct mount_attr *__uattr, size_t __usize) |
| 321 | 327 | __THROW; |
| 322 | 328 | |
| 329 | #endif /* (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 36) || __GLIBC__ > 2 */ | |
| 330 | ||
| 323 | 331 | __END_DECLS |
| 324 | 332 | |
| 325 | #endif /* _SYS_MOUNT_H */ | |
| \ No newline at end of file | ||
| 333 | #endif /* _SYS_MOUNT_H */ |
lib/libc/include/generic-glibc/sys/pidfd.h+11-1| ... | ... | @@ -21,6 +21,9 @@ |
| 21 | 21 | #include <fcntl.h> |
| 22 | 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 | 27 | #define PIDFD_NONBLOCK O_NONBLOCK |
| 25 | 28 | #define PIDFD_THREAD O_EXCL |
| 26 | 29 | |
| ... | ... | @@ -45,8 +48,15 @@ extern int pidfd_getfd (int __pidfd, int __targetfd, |
| 45 | 48 | extern int pidfd_send_signal (int __pidfd, int __sig, siginfo_t *__info, |
| 46 | 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 | 56 | /* Query the process ID (PID) from process descriptor FD. Return the PID |
| 49 | 57 | or -1 in case of an error. */ |
| 50 | 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 */ |
lib/libc/include/generic-glibc/unistd.h+4-1| ... | ... | @@ -1203,6 +1203,8 @@ int getentropy (void *__buffer, size_t __length) __wur |
| 1203 | 1203 | #endif |
| 1204 | 1204 | |
| 1205 | 1205 | #ifdef __USE_GNU |
| 1206 | // zig patch: check target glibc version | |
| 1207 | # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || __GLIBC__ > 2 | |
| 1206 | 1208 | /* Close all file descriptors in the range FD up to MAX_FD. The flag FLAGS |
| 1207 | 1209 | are define by the CLOSE_RANGE prefix. This function behaves like close |
| 1208 | 1210 | on the range and gaps where the file descriptor is invalid or errors |
| ... | ... | @@ -1210,6 +1212,7 @@ int getentropy (void *__buffer, size_t __length) __wur |
| 1210 | 1212 | successor or -1 for failure (and sets errno accordingly). */ |
| 1211 | 1213 | extern int close_range (unsigned int __fd, unsigned int __max_fd, |
| 1212 | 1214 | 			int __flags) __THROW; |
| 1215 | # endif | |
| 1213 | 1216 | #endif |
| 1214 | 1217 | |
| 1215 | 1218 | /* Define some macros helping to catch buffer overflows. */ |
| ... | ... | @@ -1222,4 +1225,4 @@ extern int close_range (unsigned int __fd, unsigned int __max_fd, |
| 1222 | 1225 | |
| 1223 | 1226 | __END_DECLS |
| 1224 | 1227 | |
| 1225 | #endif /* unistd.h */ | |
| \ No newline at end of file | ||
| 1228 | #endif /* unistd.h */ |