Not sure if I ran into the same problem, but I was getting the same error. I realized that I didn't have /usr/src/linux pointing to the correct kernel header files. After doing
# ln -s /usr/src/kernel-headers-2.4.18-686 /usr/src/linux
# make clean
I got it to work.