Jamie Ostrowski wrote:
> 
>    It's a homebrew module from "Linux Device Drivers 2nd Edition"
> 
>    Here is the source for the module:
> 
> #define MODULE
> #include <linux/module.h>
> 
> int init_module(void) { printk("<1>Hello, world\n"); return 0; }
> void cleanup_module(void) { printk("<1>Goodbye cruel world\n"); }
> 
> 
>      - compiled with gcc version 2.96 on Red Hat 7.1 with the 2.4.19
> kernel.
> 
>       This is how I compiled and tried executing: >
> 
> 1) gcc -c hello.c
> 2) insmod hello.o
> 
>       - Jamie
> 

The problem is the headers your compiling against. In your /usr/include 
directory your linux and asm directories are most likely from a 2.4.2-2 
kernel. So when you compile it you get the wrong version info.

you can change the include to be #include "linux/module.h" and and a 
-I/path/to/linux/src/include to you gcc line

Eric