diff options
author | Patrick McHardy <kaber@trash.net> | 2006-03-24 01:07:34 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-24 18:44:58 -0500 |
commit | a1a8feed1743ec8d2af1dafa7c5321679f0a3e4f (patch) | |
tree | 6323d9b66be6eb681564a4c82aa262d4bbb3e333 /include/linux/module.h | |
parent | 4dc6d9cc38cea1004a7f827cf76409ae42231fee (diff) |
[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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 70bd843c71c..d9569151c18 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -183,6 +183,7 @@ void *__symbol_get_gpl(const char *symbol); | |||
183 | 183 | ||
184 | /* For every exported symbol, place a struct in the __ksymtab section */ | 184 | /* For every exported symbol, place a struct in the __ksymtab section */ |
185 | #define __EXPORT_SYMBOL(sym, sec) \ | 185 | #define __EXPORT_SYMBOL(sym, sec) \ |
186 | extern typeof(sym) sym; \ | ||
186 | __CRC_SYMBOL(sym, sec) \ | 187 | __CRC_SYMBOL(sym, sec) \ |
187 | static const char __kstrtab_##sym[] \ | 188 | static const char __kstrtab_##sym[] \ |
188 | __attribute__((section("__ksymtab_strings"))) \ | 189 | __attribute__((section("__ksymtab_strings"))) \ |