libredirect: fix build on musl libc
musl doesn't yet provide a wrapper for the statx syscall, so don't bother wrapping it here unless it's actually available.
This commit is contained in:
parent
f876e1f1e9
commit
07c6e6b2b8
@ -201,7 +201,7 @@ WRAPPER(int, __xstat64)(int ver, const char * path, struct stat64 * st)
|
||||
WRAPPER_DEF(__xstat64)
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) && defined(STATX_TYPE)
|
||||
WRAPPER(int, statx)(int dirfd, const char * restrict pathname, int flags,
|
||||
unsigned int mask, struct statx * restrict statxbuf)
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ int main(int argc, char *argv[])
|
||||
#ifndef __APPLE__
|
||||
struct stat64 testsb64;
|
||||
#endif
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) && defined(STATX_TYPE)
|
||||
struct statx testsbx;
|
||||
#endif
|
||||
char buf[PATH_MAX];
|
||||
@ -89,7 +89,7 @@ int main(int argc, char *argv[])
|
||||
#ifndef __APPLE__
|
||||
assert(fstatat64(123, TESTPATH, &testsb64, 0) != -1);
|
||||
#endif
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) && defined(STATX_TYPE)
|
||||
assert(statx(123, TESTPATH, 0, STATX_ALL, &testsbx) != -1);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user