summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/powerpc
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-05-30 01:15:03 -0400
committerMike Frysinger <vapier@gentoo.org>2012-05-30 01:16:45 -0400
commit52fa45da0f86651b70608a58914f3aece7fdfed5 (patch)
tree472e5658d3197f4d5a3cd3f5691eff433cec13ef /libc/sysdeps/linux/powerpc
parentb7792601c9a8ed7c78551861c2f3305edda5dd66 (diff)
pread/pwrite: handle renamed syscalls in common/ppc/xtensa code
Some arches got this fix, but many did not. So copy the ifdef logic to the ones that missed it to fix behavior in linux-2.6+. URL: https://bugs.busybox.net/show_bug.cgi?id=5258 Reported-by: David Laight <david.laight@aculab.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libc/sysdeps/linux/powerpc')
-rw-r--r--libc/sysdeps/linux/powerpc/pread_write.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/powerpc/pread_write.c b/libc/sysdeps/linux/powerpc/pread_write.c
index 7f988d301..23f256f6d 100644
--- a/libc/sysdeps/linux/powerpc/pread_write.c
+++ b/libc/sysdeps/linux/powerpc/pread_write.c
@@ -20,6 +20,13 @@
# define off64_t off_t
#endif
+#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
extern __typeof(pread) __libc_pread;
# define __NR___syscall_pread __NR_pread
@@ -42,6 +49,12 @@ weak_alias(__libc_pread64,pread64)
# endif /* __UCLIBC_HAS_LFS__ */
#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
extern __typeof(pwrite) __libc_pwrite;