1.3.38...argh! modules!

Todd Fries (tfries@umr.edu)
Tue, 7 Nov 1995 23:20:01 -0600 (CST)


[I provide the following for informational purposes..no hard feelings, just
confusion as to why so much is broken..for me..]

Ok, I downloaded the 1.3.36 source, and when 1.3.38 roled around I patched
up to 1.3.38, and compile it. For some strange reason, like I had a fast
computer to compile on for once, I decided to compile more modules than
normal. I've by no means compiled all the modules, so I'm sure there are
problems in the other modules..

Anyway, if a module include <linux/module.h>, the kernel_version is set in
the module.h...

However, the modules that had the problems ALSO had it defined in
the .c (or for the soundcard os.h) file as well..

Which, of course, aborted in 'multiple definition of 'kernel version'' errors...

for most modules, the fix (I assume) was to remote the kernel_version line
from the sourcecode, although with the soundcard and now the minix filesystem,
it isn't so simple.

I've had to remove from os.h and place in soundcard.h:
#ifdef MODULE...
#include <linux/module.h>
#endif

I assume these are oversights or some recent change?

the modules that I found to have these problems include:

drivers/char: atixlmouse, busmouse, lp, msbusmouse
drivers/net: tunnel, ppp
drivers/cdrom: mcd

I had to modify the sound driver, as stated above, and also, I had to
modify the following filesystems by removing the #include <linux/module.h>
from all but inode.c, and removing 'kernel_version[]=UTS_RELEASE;' from
that file:

minix, msdos, isofs, nfs, msdos, umsdos, hpfs

And i get errors such as:

gcc -D__KERNEL__ -I/home/tfries/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m386 -DMODULE -c -o sock.o sock.c
sock.c: In function `smb_data_callback':
sock.c:43: structure has no member named `recvfrom'
sock.c:49: structure has no member named `recvfrom'
sock.c:58: structure has no member named `recvfrom'
sock.c:37: warning: `result' might be used uninitialized in this function
sock.c: In function `smb_receive_raw':
sock.c:193: structure has no member named `recvfrom'
sock.c:240: structure has no member named `recvfrom'
sock.c:182: warning: `result' might be used uninitialized in this function
sock.c: In function `smb_request':
sock.c:491: structure has no member named `send'
sock.c: In function `smb_trans2_request':
sock.c:559: structure has no member named `send'
sock.c: In function `smb_request_read_raw':
sock.c:630: structure has no member named `send'
sock.c: In function `smb_request_write_raw':
sock.c:698: structure has no member named `send'
sock.c:702: structure has no member named `send'
make[2]: *** [sock.o] Error 1
make[2]: Leaving directory `/home/tfries/linux/fs/smbfs'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/tfries/linux/fs'
make: *** [modules] Error 2

So samba doesn't compile, and I don't want to mess with it...

If someone would like a patch, I could supply it, but I have a feeling someone
more accustomed to the kernel source than me would be better suited to fixing
it...

-- 
Todd Fries...tfries@umr.edu
http://www.cs.umr.edu/~tfries