summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2018-04-02 14:41:25 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2018-04-02 14:41:25 +0100
commit161d237ad04eb3815ebf154f0bec9ab88195a70f (patch)
treebedca8770c860e7140e811425f3a49c93c381076 /libc/sysdeps/linux
parent91e21d25187d24bdd48875fb2544ec195ca2104a (diff)
use __NR_newfstatat only for modern Linux architectures
Otherwise it breaks mips64 n64. Should be used for aarch64/tilegx only.
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/common/fstat.c2
-rw-r--r--libc/sysdeps/linux/common/stat.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/common/fstat.c b/libc/sysdeps/linux/common/fstat.c
index 53fa82680..030360dfc 100644
--- a/libc/sysdeps/linux/common/fstat.c
+++ b/libc/sysdeps/linux/common/fstat.c
@@ -20,7 +20,7 @@ int fstat(int fd, struct stat *buf)
}
libc_hidden_def(fstat)
-#elif __WORDSIZE == 64 && defined __NR_newfstatat
+#elif __WORDSIZE == 64 && defined __NR_newfstatat && !defined __ARCH_HAS_DEPRECATED_SYSCALLS__
#include <fcntl.h>
int fstat(int fd, struct stat *buf)
diff --git a/libc/sysdeps/linux/common/stat.c b/libc/sysdeps/linux/common/stat.c
index 3a6f533a9..6489d229b 100644
--- a/libc/sysdeps/linux/common/stat.c
+++ b/libc/sysdeps/linux/common/stat.c
@@ -20,7 +20,7 @@ int stat(const char *file_name, struct stat *buf)
return fstatat(AT_FDCWD, file_name, buf, 0);
}
-#elif __WORDSIZE == 64 && defined __NR_newfstatat
+#elif __WORDSIZE == 64 && defined __NR_newfstatat && !defined __ARCH_HAS_DEPRECATED_SYSCALLS__
# include <fcntl.h>
int stat(const char *file_name, struct stat *buf)