Ticket #4981: 986-kbuild-unifdef-fix.patch

File 986-kbuild-unifdef-fix.patch, 1.8 KB (added by russushko@…, 9 years ago)

The fix for ticke #4981

  • scripts/unifdef.c

    From: Justin P. Mattock <justinmattock@gmail.com>
    Date: Sat, 7 Mar 2009 12:31:29 +0000 (+0100)
    Subject: kbuild: fix C libary confusion in unifdef.c due to getline()
    X-Git-Tag: v2.6.29-rc8~2^2~3
    X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=d15bd1067b1fcb2b7250d22bc0c7c7fea0b759f7;hp=559595a985e106d2fa9f0c79b7f5805453fed593
    
    kbuild: fix C libary confusion in unifdef.c due to getline()
    
    This fixes an error when compiling the kernel.
    
      CHK     include/linux/version.h
      HOSTCC  scripts/unifdef
    scripts/unifdef.c:209: error: conflicting types for 'getline'
    /usr/include/stdio.h:651: note: previous declaration of 'getline' was here
    make[1]: *** [scripts/unifdef] Error 1
    make: *** [__headers] Error 2
    
    Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
    Cc:  Frederic Weisbecker <fweisbec@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
    ---
    
    diff --git a/scripts/unifdef.c b/scripts/unifdef.c
    index 552025e..05a31a6 100644
    a b static void done(void); 
    206206static void             error(const char *); 
    207207static int              findsym(const char *); 
    208208static void             flushline(bool); 
    209 static Linetype         getline(void); 
     209static Linetype         get_line(void); 
    210210static Linetype         ifeval(const char **); 
    211211static void             ignoreoff(void); 
    212212static void             ignoreon(void); 
    process(void) 
    512512 
    513513        for (;;) { 
    514514                linenum++; 
    515                 lineval = getline(); 
     515                lineval = get_line(); 
    516516                trans_table[ifstate[depth]][lineval](); 
    517517                debug("process %s -> %s depth %d", 
    518518                    linetype_name[lineval], 
    process(void) 
    526526 * help from skipcomment(). 
    527527 */ 
    528528static Linetype 
    529 getline(void) 
     529get_line(void) 
    530530{ 
    531531        const char *cp; 
    532532        int cursym;