Chinaunix首页 | 论坛 | 博客
  • 博客访问: 816426
  • 博文数量: 124
  • 博客积分: 1927
  • 博客等级: 上尉
  • 技术积分: 932
  • 用 户 组: 普通用户
  • 注册时间: 2010-08-31 14:06
文章分类

全部博文(124)

文章存档

2018年(5)

2017年(2)

2016年(6)

2015年(4)

2014年(24)

2013年(7)

2012年(11)

2011年(13)

2010年(52)

我的朋友

分类: LINUX

2012-05-11 14:57:01

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

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

---
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;
 
说白了就是将scripts/unifdef.c中的getline函数重命名。这里命名为:parseline
阅读(3276) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~