Browse Source

use __NR_newfstatat only for modern Linux architectures

Otherwise it breaks mips64 n64.
Should be used for aarch64/tilegx only.
Waldemar Brodkorb 6 years ago
parent
commit
161d237ad0
2 changed files with 2 additions and 2 deletions
  1. 1 1
      libc/sysdeps/linux/common/fstat.c
  2. 1 1
      libc/sysdeps/linux/common/stat.c

+ 1 - 1
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)

+ 1 - 1
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)