Do you have kernel headers installed too for 2.4.18-5? If not then please do this:

mv /usr/include/linux old_linux_headers
then do a
ln -s ../src/linux/include/linux/ linux

this make the system headers current with currnet kernel.

then please start over... i know its a pain. linux rocks when it is all set up properly