This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Support 2.6.22 i386 kernel header


__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,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]