| 1 | This patch allows libc to be used with the heavily-patched kernel found
|
| 2 | on CentOS 6, which identifies itself as 2.6.32.
|
| 3 |
|
| 4 | See <https://lists.gnu.org/archive/html/guix-devel/2018-02/msg00392.html>.
|
| 5 |
|
| 6 | Patch taken from Nixpkgs.
|
| 7 |
|
| 8 | diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure
|
| 9 | index cace758c01..38fe7fe0b0 100644
|
| 10 | |
| 11 | |
| 12 | @@ -69,7 +69,7 @@ fi
|
| 13 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel header at least $minimum_kernel" >&5
|
| 14 | $as_echo_n "checking for kernel header at least $minimum_kernel... " >&6; }
|
| 15 | decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
|
| 16 | -abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
|
| 17 | +abinum=`echo "2.6.32.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
|
| 18 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
| 19 | /* end confdefs.h. */
|
| 20 | #include <linux/version.h>
|
| 21 | diff --git a/sysdeps/unix/sysv/linux/configure.ac b/sysdeps/unix/sysv/linux/configure.ac
|
| 22 | index 13abda0a51..6abc12eaed 100644
|
| 23 | |
| 24 | |
| 25 | @@ -50,7 +50,7 @@ fi
|
| 26 | AC_MSG_CHECKING(for kernel header at least $minimum_kernel)
|
| 27 | changequote(,)dnl
|
| 28 | decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
|
| 29 | -abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
|
| 30 | +abinum=`echo "2.6.32.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
|
| 31 | changequote([,])dnl
|
| 32 | AC_TRY_COMPILE([#include <linux/version.h>
|
| 33 | #if LINUX_VERSION_CODE < $decnum
|
| 34 | diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h
|
| 35 | index 823cd8224d..482caaeeec 100644
|
| 36 | |
| 37 | |
| 38 | @@ -39,7 +39,7 @@
|
| 39 | GLRO(dl_osversion) = version; \
|
| 40 | \
|
| 41 | /* Now we can test with the required version. */ \
|
| 42 | - if (__LINUX_KERNEL_VERSION > 0 && version < __LINUX_KERNEL_VERSION) \
|
| 43 | + if (__LINUX_KERNEL_VERSION > 0 && version < __LINUX_KERNEL_VERSION && version != 0x020620) \
|
| 44 | /* Not sufficent. */ \
|
| 45 | FATAL ("FATAL: kernel too old\n"); \
|
| 46 | } \
|