summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2014-12-28 21:33:35 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2014-12-28 21:33:35 +0100
commit5f7dc9b62575cfab781abda80602515ce42b43e8 (patch)
tree232aa0811dc134587a91d81d61f1dfc5fe43edb8
parent33b126af0e3036d554ef993acfe3f204066e2376 (diff)
for mips64 with N32 ABI we need to use newfstatat
Fixes compile errors with latest util-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>