diff options
author | Noah Fontes <noah@noahfontes.com> | 2023-02-05 17:33:08 -0800 |
---|---|---|
committer | Noah Fontes <noah@noahfontes.com> | 2023-02-06 10:18:52 -0800 |
commit | 07c6e6b2b848a42198494b77df0521eabd61c5eb (patch) | |
tree | 71b6999aec322ed63a3bf65828b845479e5da427 | |
parent | f876e1f1e910b70ce100da7a555dd5262d407960 (diff) | |
download | nixpkgs-07c6e6b2b848a42198494b77df0521eabd61c5eb.tar nixpkgs-07c6e6b2b848a42198494b77df0521eabd61c5eb.tar.gz nixpkgs-07c6e6b2b848a42198494b77df0521eabd61c5eb.tar.bz2 nixpkgs-07c6e6b2b848a42198494b77df0521eabd61c5eb.tar.lz nixpkgs-07c6e6b2b848a42198494b77df0521eabd61c5eb.tar.xz nixpkgs-07c6e6b2b848a42198494b77df0521eabd61c5eb.tar.zst nixpkgs-07c6e6b2b848a42198494b77df0521eabd61c5eb.zip |
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.
-rw-r--r-- | pkgs/build-support/libredirect/libredirect.c | 2 | ||||
-rw-r--r-- | pkgs/build-support/libredirect/test.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/build-support/libredirect/libredirect.c b/pkgs/build-support/libredirect/libredirect.c index 9f438d67dc6..9ecc16450cc 100644 --- a/pkgs/build-support/libredirect/libredirect.c +++ b/pkgs/build-support/libredirect/libredirect.c @@ -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) { diff --git a/pkgs/build-support/libredirect/test.c b/pkgs/build-support/libredirect/test.c index 650bdd84903..7dd384ae3ed 100644 --- a/pkgs/build-support/libredirect/test.c +++ b/pkgs/build-support/libredirect/test.c @@ -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 |