mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Minor compile fix for some modules.
@ 2002-12-30  6:20 Rusty Russell
  0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2002-12-30  6:20 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel

Linus, please apply trivial patch.

Expose declaration of __this_module outside #ifdef KBUILD_MODNAME
(which is not defined for objects included in two modules).

diff -urNp --exclude TAGS -X /home/rusty/current-dontdiff --minimal linux-2.5-bk/include/linux/module.h working-2.5-bk-section-ordering/include/linux/module.h
--- linux-2.5-bk/include/linux/module.h	Mon Dec 30 15:30:15 2002
+++ working-2.5-bk-section-ordering/include/linux/module.h	Mon Dec 30 17:14:53 2002
@@ -285,7 +285,9 @@ static inline const char *module_address
 }
 #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.th
 	.exit = cleanup_module,
 #endif
 };
-#endif /* MODULE && KBUILD_MODNAME */
+#endif /* KBUILD_MODNAME */
+#endif /* MODULE */
 
 /* For archs to search exception tables */
 extern struct list_head extables;




--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-12-30  6:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-30  6:20 [PATCH] Minor compile fix for some modules Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome