summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/kernel-features.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/kernel-features.h')
-rw-r--r--sysdeps/unix/sysv/linux/kernel-features.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index 3bc5dc03c2..b28cb73626 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -111,7 +111,8 @@
/* On sparc and ARM the truncate64/ftruncate64/mmap2/stat64/lstat64/fstat64
syscalls were introduced in 2.3.35. */
-#if __LINUX_KERNEL_VERSION >= 131875 && (defined __sparc__ || defined __arm__)
+#if __LINUX_KERNEL_VERSION >= 131875 \
+ && ((defined __sparc__ && !defined __arch64__) || defined __arm__)
# define __ASSUME_TRUNCATE64_SYSCALL 1
# define __ASSUME_MMAP2_SYSCALL 1
# define __ASSUME_STAT64_SYSCALL 1
@@ -449,3 +450,9 @@
#if __LINUX_KERNEL_VERSION >= 0x020609 && defined __alpha__
#define __ASSUME_IEEE_RAISE_EXCEPTION 1
#endif
+
+/* On sparc64 stat64/lstat64/fstat64 syscalls were introduced in 2.6.12. */
+#if __LINUX_KERNEL_VERSION >= 0x02060c && defined __sparc__ \
+ && defined __arch64__
+# define __ASSUME_STAT64_SYSCALL 1
+#endif