[uClibc] [PATCH]:Buildroot compilation error with GCC4.0
Khem Raj
kraj at mvista.com
Wed Jul 27 01:40:14 MDT 2005
Mike Frysinger wrote:
>On Thursday 21 July 2005 03:42 pm, Khem Raj wrote:
>
>
>>mconf.c:104: error: static declaration of 'current_menu' follows
>>non-static declaration
>>lkc.h:63: error: previous declaration of 'current_menu' was here
>>
>>Looking at the source it seems that the current_menu is declared static
>>and exported at same time.
>>as a simple fix I removed the static declaration and made is global.
>>Make menuconfig succeeded after that
>>
>>
>
>does the attached patch work for you ? these changes are taken from the
>current linux-2.6 git tree ...
>-mike
>
>
>------------------------------------------------------------------------
>
>Index: package/config/zconf.tab.c_shipped
>===================================================================
>--- package/config/zconf.tab.c_shipped (revision 10917)
>+++ package/config/zconf.tab.c_shipped (working copy)
>@@ -175,6 +175,8 @@
>
> struct symbol *symbol_hash[257];
>
>+static struct menu *current_menu, *current_entry;
>+
> #define YYERROR_VERBOSE
>
>
>Index: package/config/menu.c
>===================================================================
>--- package/config/menu.c (revision 10917)
>+++ package/config/menu.c (working copy)
>@@ -10,7 +10,6 @@
> #include "lkc.h"
>
> struct menu rootmenu;
>-struct menu *current_menu, *current_entry;
> static struct menu **last_entry_ptr;
>
> struct file *file_list;
>Index: package/config/zconf.y
>===================================================================
>--- package/config/zconf.y (revision 10917)
>+++ package/config/zconf.y (working copy)
>@@ -25,6 +25,8 @@
>
> struct symbol *symbol_hash[257];
>
>+static struct menu *current_menu, *current_entry;
>+
> #define YYERROR_VERBOSE
> %}
> %expect 40
>Index: package/config/lkc.h
>===================================================================
>--- package/config/lkc.h (revision 10917)
>+++ package/config/lkc.h (working copy)
>@@ -59,9 +59,6 @@
> struct file *file_lookup(const char *name);
> int file_write_dep(const char *name);
>
>-extern struct menu *current_entry;
>-extern struct menu *current_menu;
>-
> /* symbol.c */
> void sym_init(void);
> void sym_clear_all_valid(void);
>
>
Mike
I tested this patch and it works fine.
More information about the uClibc
mailing list