[ENBD] Problems compiling 2.4.26a on RH6.2 kernel 2.2.19

Nelson Vieira enbd@lists.community.tummy.com
Fri, 11 Jan 2002 13:31:17 -0600


Well that seemed to have done the trick. It now successfully compiles nbd.o
with the following warnings:

gcc -O2 -Wall -D_LARGEFILE64_SOURCE -D__KERNEL__ -DMODULE -DDEBUG=0 -I/home/
neno/nbd-2.4.26a/linux/include -I/usr/src/linux/include  -c -o nbd.o
/home/neno/nbd-2.4.26a/linux/drivers/block/nbd.c
/home/neno/nbd-2.4.26a/linux/drivers/block/nbd.c:227: warning: `module_init'
redefined
/usr/src/linux/include/linux/init.h:117: warning: this is the location of
the previous definition
/home/neno/nbd-2.4.26a/linux/drivers/block/nbd.c:228: warning: `module_exit'
redefined
/usr/src/linux/include/linux/init.h:121: warning: this is the location of
the previous definition
/home/neno/nbd-2.4.26a/linux/drivers/block/nbd.c:259: warning: static
declaration for `mark_buffer_protected' follows non-static
/home/neno/nbd-2.4.26a/linux/drivers/block/nbd.c: In function
`cleanup_module':
/home/neno/nbd-2.4.26a/linux/drivers/block/nbd.c:4912: warning: control
reaches end of non-void function
make[1]: Leaving directory `/tmp'

I'm not, but any means, a Linux system programmer, but this looks OK to me.

Thanks.
-
----- Original Message -----
From: "Peter T. Breuer" <ptb@it.uc3m.es>
To: "Enhanced NBD" <enbd@lists.community.tummy.com>
Sent: Friday, January 11, 2002 12:46 PM
Subject: Re: [ENBD] Problems compiling 2.4.26a on RH6.2 kernel 2.2.19


> "A month of sundays ago ptb wrote:"
> > Perhaps put
> >
> >     #ifndef schedule_task
> >       #define schedule_task(x) queue_task(x,&tq_scheduler)
> >     #endif
> >
> > etc.  ??  Suggestions?  This will foulup when there are real functions
>
> I forgot to say that the __init/__exit business comes about because
> 2.4 has unified tha handling of initial and final functions in both
> modules and kernel, so it is sufficient to use __init/__exit as
> a modiffier for init_module and cleanup_module respectively.
>
> The worst that can happen by omitting these modifiers is that you waste
> some memory space. But I don't know what to do about it because of the
> considerable amount of linker magic flying around here. Let me know
> if things seem to go alright in 2.2.19 with
>
>    #ifndef __exit
>     #define __exit  __attribute__ ((unused, __section__(".text.exit")))
>   #endif
>   #ifndef __init
>     #define __init          __attribute__ ((__section__ (".text.init")))
>   #endif
>
> and if there is some horror story that results, tell me that I simply
> have to define them away to nothing in 2.2.19.
>
> Peter
> _______________________________________________
> ENBD mailing list
> ENBD@lists.community.tummy.com
> http://lists.community.tummy.com/mailman/listinfo/enbd
>