Skip to content

Commit 6449bd6

Browse files
Andrew MortonSam Ravnborg
authored andcommitted
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 <akpm@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
1 parent b817f6f commit 6449bd6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎scripts/mod/modpost.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,14 +1084,15 @@ void check_license(struct module *mod)
10841084
struct symbol *s, *exp;
10851085

10861086
for (s = mod->unres; s; s = s->next) {
1087+
const char *basename;
10871088
if (mod->gpl_compatible == 1) {
10881089
/* GPL-compatible modules may use all symbols */
10891090
continue;
10901091
}
10911092
exp = find_symbol(s->name);
10921093
if (!exp || exp->module == mod)
10931094
continue;
1094-
const char *basename = strrchr(mod->name, '/');
1095+
basename = strrchr(mod->name, '/');
10951096
if (basename)
10961097
basename++;
10971098
switch (exp->export) {

0 commit comments

Comments
 (0)