[uClibc-cvs] CVS update of uClibc/libc/sysdeps/linux/mips (pread_write.c)

Manuel Novoa III mjn3 at codepoet.org
Tue Aug 10 18:47:08 UTC 2004


    Date: Tuesday, August 10, 2004 @ 12:47:07
  Author: mjn3
    Path: /var/cvs/uClibc/libc/sysdeps/linux/mips

Modified: pread_write.c (1.3 -> 1.4)

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.


Index: uClibc/libc/sysdeps/linux/mips/pread_write.c
diff -u uClibc/libc/sysdeps/linux/mips/pread_write.c:1.3 uClibc/libc/sysdeps/linux/mips/pread_write.c:1.4
--- uClibc/libc/sysdeps/linux/mips/pread_write.c:1.3	Mon Sep  8 17:27:46 2003
+++ uClibc/libc/sysdeps/linux/mips/pread_write.c	Tue Aug 10 12:47:06 2004
@@ -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 @@
 
 #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
 



More information about the uClibc-cvs mailing list