[OpenAFS-devel] Building cvs head on Linux 2.6

Derek Atkins warlord@MIT.EDU
Sun, 30 May 2004 12:21:31 -0400


Does it still build a working module for older versions of 2.6?

-derek

"chas williams (contractor)" <chas@cmf.nrl.navy.mil> writes:

> 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
>
>

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available