This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Update MIPS kernel-features.h for getdents64
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: libc-ports at sourceware dot org
- Date: Fri, 13 Aug 2010 23:45:10 +0000 (UTC)
- Subject: Update MIPS kernel-features.h for getdents64
The MIPS n32 syscall ABI gained the getdents64 syscall only in 2.6.35.
I've applied this patch to ensure __ASSUME_GETDENTS64_SYSCALL is defined
or undefined accordingly, to avoid problems if glibc is built with 2.6.35
or later headers for MIPS n32 but then used with an older kernel.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index bbcf818..3d0b975 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2010-08-13 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/kernel-features.h
+ (__ASSUME_GETDENTS64_SYSCALL): Undefine for n32 ABI before 2.6.35.
+
2010-08-13 Chandrakala Chavva <cchavva@caviumnetworks.com>
* sysdeps/unix/mips/mips64/n64/sysdep.h (PSEUDO): Add 'nop' in
diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h
index 6fe9b08..092c35d 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h
@@ -38,3 +38,9 @@
#endif
#include_next <kernel-features.h>
+
+/* The n32 syscall ABI did not have a getdents64 syscall until
+ 2.6.35. */
+#if _MIPS_SIM == _ABIN32 && __LINUX_KERNEL_VERSION < 0x020623
+# undef __ASSUME_GETDENTS64_SYSCALL
+#endif
--
Joseph S. Myers
joseph@codesourcery.com