summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2004-08-10 18:47:06 +0000
committerManuel Novoa III <mjn3@codepoet.org>2004-08-10 18:47:06 +0000
commit6ca9cc33a35f2d3b45ddc77438b94753b514b59f (patch)
treeb73c1383cdeed2a89c3eac0af58fe5321e5a8878 /libc
parent8b950d06499bf8d2e4a0aa123c4ac4791b8a6204 (diff)
Fix mips bug related to 2.6 headers by following glibc's lead. Based on
the comment, newer kernels appended "64" to __NR_pread and __NR_pwrite.
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/mips/pread_write.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/mips/pread_write.c b/libc/sysdeps/linux/mips/pread_write.c
index 3de0cc6d7..ab7eeebc8 100644
--- a/libc/sysdeps/linux/mips/pread_write.c
+++ b/libc/sysdeps/linux/mips/pread_write.c
@@ -40,6 +40,13 @@
#include <unistd.h>
#include <stdint.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
#ifdef __mips64
@@ -68,6 +75,14 @@ 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