From ae52cf5c50c291b5733aceffe8d1ce2e7c7a4d8d Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sun, 29 Dec 2002 18:59:13 -0800 Subject: [PATCH] Minor compile fix for some modules. Expose declaration of __this_module outside #ifdef KBUILD_MODNAME (which is not defined for objects included in two modules). --- include/linux/module.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/module.h b/include/linux/module.h index 3a411c8c6575..ebdfc27efbb8 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -285,7 +285,9 @@ static inline const char *module_address_lookup(unsigned long addr, } #endif /* CONFIG_MODULES */ -#if defined(MODULE) && defined(KBUILD_MODNAME) +#ifdef MODULE +extern struct module __this_module; +#ifdef KBUILD_MODNAME /* We make the linker do some of the work. */ struct module __this_module __attribute__((section(".gnu.linkonce.this_module"))) = { @@ -296,7 +298,8 @@ __attribute__((section(".gnu.linkonce.this_module"))) = { .exit = cleanup_module, #endif }; -#endif /* MODULE && KBUILD_MODNAME */ +#endif /* KBUILD_MODNAME */ +#endif /* MODULE */ /* For archs to search exception tables */ extern struct list_head extables; -- cgit v1.2.3