[PATCH] scripts/unifdef.c: rename getline symbol to something else



From: Kyle McMartin <kyle@xxxxxxxxxx>

Rawhide builds are currently failing to build unifdef.c, as the next
version of glibc changes the default _POSIX_C_SOURCE level, which
exposes getline() from <stdio.h>

scripts/unifdef.c:209: error: conflicting types for 'getline'
/usr/include/stdio.h:653: note: previous declaration of 'getline' was
here
make[2]: *** [scripts/unifdef] Error 1
make[1]: *** [__headers] Error 2
make: *** [vmlinux] Error 2

Rename the symbol in unifdef.c to parseline to avoid this conflicting
declaration.

Otherwise Jakub says we could add a -D_POSIX_C_SOURCE=200112L as a
workaround to unifdef CFLAGS, but this seems like it would be less
desirable in the long term.

Signed-off-by: Kyle McMartin <kyle@xxxxxxxxxx>

---
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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH] scripts/unifdef.c: rename getline symbol to something else
    ... Rawhide builds are currently failing to build unifdef.c, ... version of glibc changes the default _POSIX_C_SOURCE level, ... exposes getline() from ... Rename the symbol in unifdef.c to parseline to avoid this conflicting ...
    (Linux-Kernel)
  • Re: Demotion DC
    ... but the second DC is failing (Hard Disk problems) so I will need ... You cannot even EASILY rename ... contents of the failing drive to new disk. ... Accelerated MCSE ...
    (microsoft.public.win2000.active_directory)
  • Re: How do I get a list of filenames with spaces on bash?
    ... To ensure that in the event of a failure the original file is unaffected. ... in that case, mv doesn't affect the file not even its inode, it ... affects the current directory, it's just a rename. ... A failing cp may leave an ...
    (comp.unix.shell)
  • Re: Fastcode CharPosRev B&V 0.8.0
    ... I know but it does not make sense to rename a failing function and include ... Jeg beskyttes af den gratis SPAMfighter til privatbrugere. ...
    (borland.public.delphi.language.basm)
  • Re: How do I get a list of filenames with spaces on bash?
    ... in that case, mv doesn't affect the file not even its inode, it ... affects the current directory, it's just a rename. ... A failing cp may leave an ... Also note that cp may not preserve file attributes like ...
    (comp.unix.shell)

Loading