about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/pwrite64.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-09-14 08:32:37 +0000
committerRoland McGrath <roland@gnu.org>2002-09-14 08:32:37 +0000
commit4b172769b29087fbf9989494e7d09b8c4347208e (patch)
tree464876b018275fa8d7cfaa867117e7bc5e92119a /sysdeps/unix/sysv/linux/pwrite64.c
parent8b6ff351d8dc7f6ffef7ef03d11bed727172149f (diff)
downloadglibc-4b172769b29087fbf9989494e7d09b8c4347208e.tar.gz
glibc-4b172769b29087fbf9989494e7d09b8c4347208e.tar.xz
glibc-4b172769b29087fbf9989494e7d09b8c4347208e.zip
* sysdeps/unix/sysv/linux/pread.c: __NR_pread64 may be defined
	instead of __NR_pread.
	* sysdeps/unix/sysv/linux/pread64.c: Likewise.
	* sysdeps/unix/sysv/linux/pwrite.c: __NR_pwrite64 may be defined
	instead of __NR_pwrite.
	* sysdeps/unix/sysv/linux/pwrite64.c: Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/pwrite64.c')
-rw-r--r--sysdeps/unix/sysv/linux/pwrite64.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/pwrite64.c b/sysdeps/unix/sysv/linux/pwrite64.c
index 322dd5e4a0..ef7236496a 100644
--- a/sysdeps/unix/sysv/linux/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/pwrite64.c
@@ -27,6 +27,13 @@
 
 #include "kernel-features.h"
 
+#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_pread64
+#endif
+
 #if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
 
 extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count,