Linux-KBuild Archive on
 help / color / Atom feed
From: Kyle McMartin <>
Subject: [PATCH] scripts/unifdef.c: rename getline symbol to something else
Date: Wed, 11 Mar 2009 12:17:33 -0400
Message-ID: <> (raw)

From: Kyle McMartin <>

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

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

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 (;;) {
-		lineval = getline();
+		lineval = parseline();
 		debug("process %s -> %s depth %d",
@@ -526,7 +526,7 @@ process(void)
  * help from skipcomment().
 static Linetype
 	const char *cp;
 	int cursym;

             reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-11 16:17 Kyle McMartin [this message]
2009-03-11 18:37 ` Sam Ravnborg
2009-03-11 18:59   ` Kyle McMartin
2009-03-12  6:56     ` Andrew Morton
2009-03-13  5:52       ` Sam Ravnborg
2009-03-13  5:51         ` Kyle McMartin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-KBuild Archive on

Archives are clonable:
	git clone --mirror linux-kbuild/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-kbuild linux-kbuild/ \
	public-inbox-index linux-kbuild

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone