[MODULES]: Don't allow statically declared exports
authorPatrick McHardy <kaber@trash.net>
Fri, 24 Mar 2006 06:07:34 +0000 (22:07 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 24 Mar 2006 23:44:58 +0000 (15:44 -0800)
Add an extern declaration for exported symbols to make the compiler warn
on symbols declared statically.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/module.h

index 70bd843c71cb83872e7a9190365ed3a870fd5d1d..d9569151c18241f2dbacca1d35d5f8f01b8809c1 100644 (file)
@@ -183,6 +183,7 @@ void *__symbol_get_gpl(const char *symbol);
 
 /* For every exported symbol, place a struct in the __ksymtab section */
 #define __EXPORT_SYMBOL(sym, sec)                              \
+       extern typeof(sym) sym;                                 \
        __CRC_SYMBOL(sym, sec)                                  \
        static const char __kstrtab_##sym[]                     \
        __attribute__((section("__ksymtab_strings")))           \