generic glibc: guard statx declaration

It was added in glibc 2.28
This commit is contained in:
Hugo Beauzée-Luyssen
2025-02-05 13:54:17 +01:00
parent fdef5c564d
commit 5d2584e53e

View File

@@ -25,6 +25,9 @@
#include <bits/types/struct_statx_timestamp.h>
#include <bits/types/struct_statx.h>
// zig patch: check target glibc version
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 28) || __GLIBC__ > 2
#ifndef STATX_TYPE
# define STATX_TYPE 0x0001U
# define STATX_MODE 0x0002U
@@ -63,4 +66,6 @@ int statx (int __dirfd, const char *__restrict __path, int __flags,
unsigned int __mask, struct statx *__restrict __buf)
__THROW __nonnull ((2, 5));
__END_DECLS
__END_DECLS
#endif /* (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 28) || __GLIBC__ > 2 */