[OpenAFS-devel] Building cvs head on Linux 2.6

chas williams (contractor) chas@cmf.nrl.navy.mil
Sun, 30 May 2004 11:14:09 -0400


In message <200405301253.i4UCrMw1022786@ginger.cmf.nrl.navy.mil>,"chas williams
 (contractor)" writes:
as ticket #4767.  you could try that or the following might be things
to load.

i actually screwed this patch up a bit.  it should be KBUILD_BASENAME
not DKBUILD_BASENAME.  with this and the _count fix, i can build a working
module for 2.6.7-rc2.

Index: src/afs/LINUX/osi_module.c
===================================================================
RCS file: /cvs/openafs/src/afs/LINUX/osi_module.c,v
retrieving revision 1.49
diff -u -u -r1.49 osi_module.c
--- src/afs/LINUX/osi_module.c	15 May 2004 06:43:12 -0000	1.49
+++ src/afs/LINUX/osi_module.c	30 May 2004 12:51:52 -0000
@@ -43,6 +43,20 @@
 
 MODULE_INFO(vermagic, VERMAGIC_STRING);
 
+struct module __this_module
+__attribute__((section(".gnu.linkonce.this_module"))) = {
+ .name = __stringify(KBUILD_BASENAME),
+ .init = init_module,
+#ifdef CONFIG_MODULE_UNLOAD
+ .exit = cleanup_module,
+#endif
+};
+
+static const char __module_depends[]
+__attribute_used__
+__attribute__((section(".modinfo"))) =
+"depends=";
+
 #endif
 
 #ifdef AFS_SPARC64_LINUX24_ENV