This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Support 2.6.22 i386 kernel header
- From: "H.J. Lu" <hjl at lucon dot org>
- To: GNU C Library <libc-alpha at sources dot redhat dot com>
- Date: Thu, 23 Aug 2007 10:57:14 -0700
- Subject: 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,