3
0
Fork 0
forked from mirrors/nixpkgs

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

svn path=/nixpkgs/trunk/; revision=26741
This commit is contained in:
Ludovic Courtès 2011-04-07 13:57:43 +00:00
parent 3f609d2e35
commit 16d86dcbe2
3 changed files with 43 additions and 0 deletions

View file

@ -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;

View file

@ -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;
};
}

View file

@ -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
];
};