Merge pull request #214854 from impl/libredirect-statx-musl

[staging-next] libredirect: fix build on musl libc

Changed files
+3 -3
pkgs
build-support
libredirect
+1 -1
pkgs/build-support/libredirect/libredirect.c
···
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)
{
+2 -2
pkgs/build-support/libredirect/test.c
···
#ifndef __APPLE__
struct stat64 testsb64;
#endif
-
#ifdef __linux__
+
#if defined(__linux__) && defined(STATX_TYPE)
struct statx testsbx;
#endif
char buf[PATH_MAX];
···
#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