Author: ludo
Date: Thu Apr  7 13:57:43 2011
New Revision: 26741
URL: https://svn.nixos.org/websvn/nix/?rev=26741&sc=1

Log:
Linux 2.6.{25,28}: Allow compilation with recent Glibc.

Added:
   nixpkgs/trunk/pkgs/os-specific/linux/kernel/getline.patch
Modified:
   nixpkgs/trunk/pkgs/os-specific/linux/kernel/patches.nix
   nixpkgs/trunk/pkgs/top-level/all-packages.nix

Added: nixpkgs/trunk/pkgs/os-specific/linux/kernel/getline.patch
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/os-specific/linux/kernel/getline.patch   Thu Apr  7 
13:57:43 2011        (r26741)
@@ -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;

Modified: nixpkgs/trunk/pkgs/os-specific/linux/kernel/patches.nix
==============================================================================
--- nixpkgs/trunk/pkgs/os-specific/linux/kernel/patches.nix     Thu Apr  7 
12:47:20 2011        (r26740)
+++ nixpkgs/trunk/pkgs/os-specific/linux/kernel/patches.nix     Thu Apr  7 
13:57:43 2011        (r26741)
@@ -286,4 +286,11 @@
     sha256 = "0acllabvbm9pmjnh0zx9mgnp47xbrl9ih6i037c85h0ymnjsxdhk";
   };
 
+  glibc_getline =
+    {
+      # Patch to work around conflicting types for the `getline' function
+      # with recent Glibcs (2009).
+      name = "glibc-getline";
+      patch = ./getline.patch;
+    };
 }

Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix       Thu Apr  7 12:47:20 
2011        (r26740)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix       Thu Apr  7 13:57:43 
2011        (r26741)
@@ -4916,6 +4916,7 @@
     kernelPatches =
       [ kernelPatches.fbcondecor_2_6_25
         kernelPatches.sec_perm_2_6_24
+        kernelPatches.glibc_getline
       ];
   };
 
@@ -4935,6 +4936,7 @@
       [ kernelPatches.fbcondecor_2_6_28
         kernelPatches.sec_perm_2_6_24
         kernelPatches.ext4_softlockups_2_6_28
+        kernelPatches.glibc_getline
       ];
   };
 
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to