Hi, >>"Luiz" == Luiz Otavio L Zorzella <[EMAIL PROTECTED]> writes:
Luiz> Forgive my dumbness... I've been thinking exactly what are the Luiz> implications of what your're saying. Please correct me if I'm Luiz> wrong: Luiz> 1) sndshield, at *compilation time*, greps autoconf.h to guess Luiz> which kernel version is being used. In my case, since it did not Luiz> find any at /usr/src/linux/include, it found one at Luiz> /usr/include, which was a symlink to 2.0.32 headers. This way it Luiz> thought it was being compiled in a 2.0.32 system. It depends on whatever is in the directory /usr/src/linux to have any connection whatsover with the kernel one is compiling for. The kernel itself make no such assumptions. I compile kernel in /usr/local/src/kernel. No problems whatsover. Luiz> 2) sndshield, at *run time*, does a "uname -a" (or something) to Luiz> find which kernel version is being run. In my case it found Luiz> 2.0.33, and threw a mismatch. Probably (I have not looked at the source to see if this is what they are doing) Luiz> 3) Most important: are you saying that even compiled against Luiz> 2.0.32 headers, since it was compiled under 2.0.33 it was Luiz> supposed to run without any problem? Who says it was compiled with 2.0.32 headers? From what I remember, you compiled with cc -I/usr/src/kernel-source-2.0.33/include, which means it was compiled with 2.0.33. The stupidityis that it knew better than you. It knew that the kernel sources are always always in /usr/src/linux. The correct way to do this is to include linux/version.h and compare stuff like LINUX_VERSION_CODE or UTS_RELEASE with whatever unmae gives you. There are scores of example of how to do it right, without depending on what one has in /usr/src/linux. Luiz> Question "3" is crutial for what I'm gonna suggest to OSS Luiz> people. Before you wrote me, I was thinking of suggesting them Luiz> to "-I" /usr/src/kernel-headers-`uname -r` in a debian system... Using grep in a case like this is evil. Ask them why they can't follow what the rest of kernel module writers are doing, namely, looking at uname(2), and comparing with LINUX_VERSION_CODE or UTS_RELEASE. manoj -- "Life sucks, but death doesn't put out at all...." Thomas J. Kopp Manoj Srivastava <[EMAIL PROTECTED]> <http://www.datasync.com/%7Esrivasta/> Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]