diff options
author | Ludovic Courtès <ludo@gnu.org> | 2011-04-07 13:57:43 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2011-04-07 13:57:43 +0000 |
commit | 16d86dcbe29f74c5cd12f102fd7a55999fd8f1bd (patch) | |
tree | 5c677ce37b8c3d75c01491f89e6ab643e8c1c400 | |
parent | 3f609d2e353e160dc8c89446ac78ba85e8dc51d5 (diff) | |
download | nixlib-16d86dcbe29f74c5cd12f102fd7a55999fd8f1bd.tar nixlib-16d86dcbe29f74c5cd12f102fd7a55999fd8f1bd.tar.gz nixlib-16d86dcbe29f74c5cd12f102fd7a55999fd8f1bd.tar.bz2 nixlib-16d86dcbe29f74c5cd12f102fd7a55999fd8f1bd.tar.lz nixlib-16d86dcbe29f74c5cd12f102fd7a55999fd8f1bd.tar.xz nixlib-16d86dcbe29f74c5cd12f102fd7a55999fd8f1bd.tar.zst nixlib-16d86dcbe29f74c5cd12f102fd7a55999fd8f1bd.zip |
Linux 2.6.{25,28}: Allow compilation with recent Glibc.
svn path=/nixpkgs/trunk/; revision=26741
-rw-r--r-- | pkgs/os-specific/linux/kernel/getline.patch | 34 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/patches.nix | 7 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kernel/getline.patch b/pkgs/os-specific/linux/kernel/getline.patch new file mode 100644 index 000000000000..6ac768b9d865 --- /dev/null +++ b/pkgs/os-specific/linux/kernel/getline.patch @@ -0,0 +1,34 @@ +Allow compilation with recent versions of Glibc. +From https://patchwork.kernel.org/patch/11166/. + +diff --git a/scripts/unifdef.c b/scripts/unifdef.c +index 552025e..977e682 100644 +--- a/scripts/unifdef.c ++++ b/scripts/unifdef.c +@@ -206,7 +206,7 @@ static void done(void); + static void error(const char *); + static int findsym(const char *); + static void flushline(bool); +-static Linetype getline(void); ++static Linetype parseline(void); + static Linetype ifeval(const char **); + static void ignoreoff(void); + static void ignoreon(void); +@@ -512,7 +512,7 @@ process(void) + + for (;;) { + linenum++; +- lineval = getline(); ++ lineval = parseline(); + trans_table[ifstate[depth]][lineval](); + debug("process %s -> %s depth %d", + linetype_name[lineval], +@@ -526,7 +526,7 @@ process(void) + * help from skipcomment(). + */ + static Linetype +-getline(void) ++parseline(void) + { + const char *cp; + int cursym; diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix index fafb38cae0be..38d6c2f4ec28 100644 --- a/pkgs/os-specific/linux/kernel/patches.nix +++ b/pkgs/os-specific/linux/kernel/patches.nix @@ -286,4 +286,11 @@ in sha256 = "0acllabvbm9pmjnh0zx9mgnp47xbrl9ih6i037c85h0ymnjsxdhk"; }; + glibc_getline = + { + # Patch to work around conflicting types for the `getline' function + # with recent Glibcs (2009). + name = "glibc-getline"; + patch = ./getline.patch; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6e4144971463..56e0279d5236 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4916,6 +4916,7 @@ let kernelPatches = [ kernelPatches.fbcondecor_2_6_25 kernelPatches.sec_perm_2_6_24 + kernelPatches.glibc_getline ]; }; @@ -4935,6 +4936,7 @@ let [ kernelPatches.fbcondecor_2_6_28 kernelPatches.sec_perm_2_6_24 kernelPatches.ext4_softlockups_2_6_28 + kernelPatches.glibc_getline ]; }; |