PATCH: Support 2.6.22 i386 kernel header

H.J. Lu hjl@lucon.org
Thu Aug 23 17:57:00 GMT 2007


__NR_fallocate isn't defined in 2.6.22 i386 kernel header. This patch
allows glibc to be built with 2.6.22 i386 kernel header files.

H.J.
----
2007-08-23  H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/unix/sysv/linux/i386/sysdep.h (__NR_fallocate): Define
	if not defined.

--- sysdeps/unix/sysv/linux/i386/sysdep.h.fallocate	2007-02-01 13:00:00.000000000 -0800
+++ sysdeps/unix/sysv/linux/i386/sysdep.h	2007-08-23 10:52:53.000000000 -0700
@@ -44,6 +44,12 @@
 # undef I386_USE_SYSENTER
 #endif
 
+/* This is to help the old kernel headers where __NR_fallocate is not
+   available.  */
+#ifndef __NR_fallocate
+# define __NR_fallocate 324
+#endif
+
 #ifdef __ASSEMBLER__
 
 /* Linux uses a negative return value to indicate syscall errors,



More information about the Libc-alpha mailing list