summaryrefslogtreecommitdiffstats
path: root/include/linux/module.h
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-03-23 22:07:34 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-24 15:44:58 -0800
commita1a8feed1743ec8d2af1dafa7c5321679f0a3e4f (patch)
tree6323d9b66be6eb681564a4c82aa262d4bbb3e333 /include/linux/module.h
parent4dc6d9cc38cea1004a7f827cf76409ae42231fee (diff)
downloadlinux-a1a8feed1743ec8d2af1dafa7c5321679f0a3e4f.tar.gz
linux-a1a8feed1743ec8d2af1dafa7c5321679f0a3e4f.tar.bz2
linux-a1a8feed1743ec8d2af1dafa7c5321679f0a3e4f.zip
[MODULES]: Don't allow statically declared exports
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>
Diffstat (limited to 'include/linux/module.h')
-rw-r--r--include/linux/module.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index 70bd843c71cb..d9569151c182 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -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"))) \