summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/common/fstatat64.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/fstatat64.c b/libc/sysdeps/linux/common/fstatat64.c
index 015f57d13..711521a6a 100644
--- a/libc/sysdeps/linux/common/fstatat64.c
+++ b/libc/sysdeps/linux/common/fstatat64.c
@@ -10,10 +10,18 @@
#include <bits/wordsize.h>
#include <sys/syscall.h>
+#if defined __mips__
+# include <sgidefs.h>
+#endif
+
/* 64bit ports tend to favor newfstatat() */
#if __WORDSIZE == 64 && defined __NR_newfstatat
# define __NR_fstatat64 __NR_newfstatat
#endif
+/* mips N32 ABI use newfstatat(), too */
+#if defined __mips__ && _MIPS_SIM == _ABIN32
+# define __NR_fstatat64 __NR_newfstatat
+#endif
#ifdef __NR_fstatat64
# include <sys/stat.h>