The version string encoded in one of the linux headerfiles doesnt match the kernel version. I think its in /usr/include/linux/version.h, but dont have linux kernel; src at hand. Run grep on it looking for 'version' and 'VERSION'. If you find a macro definition for the function, you can just pass the -Dmacroname=value to gcc, otherwise edit the header itself.
For module compile info, get Rubini's book Linux Device Drivers, chapters 1&2 (I believe) (visit O Reilly site for free sample), or get the Linux Kernel Module Programmers Guide (LKMPG, free though a bit dated,
www.tldp.org)