Merge pull request #152829 from r-burns/libredirect-musl

[staging] libredirect: fix musl build
This commit is contained in:
Ryan Burns 2022-01-01 14:51:56 -08:00 committed by GitHub
commit 85cc2c3e8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,7 +112,8 @@ WRAPPER(int, open)(const char * path, int flags, ...)
}
WRAPPER_DEF(open)
#ifndef __APPLE__
// In musl libc, open64 is simply a macro for open
#if !defined(__APPLE__) && !defined(open64)
WRAPPER(int, open64)(const char * path, int flags, ...)
{
int (*open64_real) (const char *, int, mode_t) = LOOKUP_REAL(open64);
@ -162,7 +163,8 @@ WRAPPER(FILE *, __nss_files_fopen)(const char * path)
WRAPPER_DEF(__nss_files_fopen)
#endif
#ifndef __APPLE__
// In musl libc, fopen64 is simply a macro for fopen
#if !defined(__APPLE__) && !defined(fopen64)
WRAPPER(FILE *, fopen64)(const char * path, const char * mode)
{
FILE * (*fopen64_real) (const char *, const char *) = LOOKUP_REAL(fopen64);