summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/xtensa
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/xtensa')
-rw-r--r--libc/sysdeps/linux/xtensa/pread_write.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/xtensa/pread_write.c b/libc/sysdeps/linux/xtensa/pread_write.c
index 71ba22bb9..bcf7dee9c 100644
--- a/libc/sysdeps/linux/xtensa/pread_write.c
+++ b/libc/sysdeps/linux/xtensa/pread_write.c
@@ -27,6 +27,13 @@ extern __typeof(pwrite64) __libc_pwrite64;
#include <bits/kernel_types.h>
+#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_pread
+# error "__NR_pread and __NR_pread64 both defined???"
+# endif
+# define __NR_pread __NR_pread64
+#endif
+
#ifdef __NR_pread
# define __NR___syscall_pread __NR_pread
@@ -52,6 +59,13 @@ weak_alias(__libc_pread64,pread64)
#endif /* __NR_pread */
+#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_pwrite
+# error "__NR_pwrite and __NR_pwrite64 both defined???"
+# endif
+# define __NR_pwrite __NR_pwrite64
+#endif
+
#ifdef __NR_pwrite
# define __NR___syscall_pwrite __NR_pwrite