diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2022-01-12 06:35:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-12 01:35:23 -0500 |
commit | 37ed2951d2729a0409e219fe0f54e081b2d882c8 (patch) | |
tree | 8474101897c8e22d9ca21ca27d41937dd1497b8c /pkgs/build-support/libredirect | |
parent | c797aa41f4453e619f6624c06407d30b1c7c7454 (diff) |
libredirect: improve musl support (#154039)
__nss_files_open is glibc only. Also mark some linux specific system calls as such for better portability with other unixes.
Diffstat (limited to 'pkgs/build-support/libredirect')
-rw-r--r-- | pkgs/build-support/libredirect/libredirect.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/build-support/libredirect/libredirect.c b/pkgs/build-support/libredirect/libredirect.c index 9dde78c74922a..0dc7feb382c37 100644 --- a/pkgs/build-support/libredirect/libredirect.c +++ b/pkgs/build-support/libredirect/libredirect.c @@ -153,7 +153,7 @@ WRAPPER(FILE *, fopen)(const char * path, const char * mode) } WRAPPER_DEF(fopen) -#ifndef __APPLE__ +#ifdef __GLIBC__ WRAPPER(FILE *, __nss_files_fopen)(const char * path) { FILE * (*__nss_files_fopen_real) (const char *) = LOOKUP_REAL(__nss_files_fopen); @@ -174,7 +174,7 @@ WRAPPER(FILE *, fopen64)(const char * path, const char * mode) WRAPPER_DEF(fopen64) #endif -#ifndef __APPLE__ +#ifdef __linux__ WRAPPER(int, __xstat)(int ver, const char * path, struct stat * st) { int (*__xstat_real) (int ver, const char *, struct stat *) = LOOKUP_REAL(__xstat); @@ -184,7 +184,7 @@ WRAPPER(int, __xstat)(int ver, const char * path, struct stat * st) WRAPPER_DEF(__xstat) #endif -#ifndef __APPLE__ +#ifdef __linux__ WRAPPER(int, __xstat64)(int ver, const char * path, struct stat64 * st) { int (*__xstat64_real) (int ver, const char *, struct stat64 *) = LOOKUP_REAL(__xstat64); |