From 16d86dcbe29f74c5cd12f102fd7a55999fd8f1bd Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 7 Apr 2011 13:57:43 +0000 Subject: Linux 2.6.{25,28}: Allow compilation with recent Glibc. svn path=/nixpkgs/trunk/; revision=26741 --- pkgs/os-specific/linux/kernel/getline.patch | 34 +++++++++++++++++++++++++++++ pkgs/os-specific/linux/kernel/patches.nix | 7 ++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 43 insertions(+) create mode 100644 pkgs/os-specific/linux/kernel/getline.patch 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 ]; }; -- cgit 1.4.1