From: Andrew Morton Date: Sat, 10 Jun 2006 03:45:06 +0000 (-0700) Subject: kbuild: modpost build fix X-Git-Tag: v2.6.18-rc1~602^2~14 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6449bd621ba51ef652ac5bda632eeabbc18dd296;p=linux-2.6 kbuild: modpost build fix scripts/mod/modpost.c: In function `check_license': scripts/mod/modpost.c:1094: parse error before `const' scripts/mod/modpost.c:1095: `basename' undeclared (first use in this function) scripts/mod/modpost.c:1095: (Each undeclared identifier is reported only once scripts/mod/modpost.c:1095: for each function it appears in.) Signed-off-by: Andrew Morton Signed-off-by: Sam Ravnborg --- diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index baa4d83d29..f27ddb841d 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1084,6 +1084,7 @@ void check_license(struct module *mod) struct symbol *s, *exp; for (s = mod->unres; s; s = s->next) { + const char *basename; if (mod->gpl_compatible == 1) { /* GPL-compatible modules may use all symbols */ continue; @@ -1091,7 +1092,7 @@ void check_license(struct module *mod) exp = find_symbol(s->name); if (!exp || exp->module == mod) continue; - const char *basename = strrchr(mod->name, '/'); + basename = strrchr(mod->name, '/'); if (basename) basename++; switch (exp->export) {