fix compilation on AIX, upstream of python/cpython#111593

This commit is contained in:
daanx 2024-05-18 16:16:36 -07:00
parent 1b21415dfa
commit d9441ffce2

View file

@ -57,7 +57,8 @@ terms of the MIT license. A copy of the license can be found in the file
#include <sys/sysctl.h> #include <sys/sysctl.h>
#endif #endif
#if !defined(__HAIKU__) && !defined(__APPLE__) && !defined(__CYGWIN__) && !defined(__OpenBSD__) && !defined(__sun) #if !defined(__HAIKU__) && !defined(__APPLE__) && !defined(__CYGWIN__) && \
!defined(__OpenBSD__) && !defined(__sun) && !defined(_AIX)
#define MI_HAS_SYSCALL_H #define MI_HAS_SYSCALL_H
#include <sys/syscall.h> #include <sys/syscall.h>
#endif #endif
@ -85,8 +86,8 @@ static int mi_prim_access(const char *fpath, int mode) {
return syscall(SYS_access,fpath,mode); return syscall(SYS_access,fpath,mode);
} }
#elif !defined(__sun) && \ #elif !defined(__sun) && !defined(_AIX) && \
(!defined(__APPLE__) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7)) // avoid unused warnings on macOS and Solaris (!defined(__APPLE__) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7)) // avoid unused warnings on macOS et al.
static int mi_prim_open(const char* fpath, int open_flags) { static int mi_prim_open(const char* fpath, int open_flags) {
return open(fpath,open_flags); return open(fpath,open_flags);