[PATCH] Minor compile fix for some modules.

From: Rusty Russell (rusty@rustcorp.com.au)
Date: Mon Dec 30 2002 - 01:20:19 EST


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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Dec 31 2002 - 22:00:15 EST