Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1a8feed authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

[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: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4dc6d9cc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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")))		\