libredirect: fix musl build

This commit is contained in:
Ryan Burns 2021-12-30 15:29:30 -08:00
parent b88fab1bfe
commit 830900ff6a

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);