[clug] Installing kernel headers

Brad Hards bradh at frogmouth.net
Wed Apr 14 08:54:00 GMT 2004


On Wed, 14 Apr 2004 06:15 pm, Brad Hards wrote:
> /usr/include/linux should match glibc
> /lib/modules/$kernel/build/include should match running kernel.
> Compile against the first for userspace and the later for kernel space.
Note that for strictly kernel interfaces (ioctl's, <linux/usbfs.h> is a 
favourite), userspace should obviously compile against the headers for the 
current kernel (that is, Linus was wrong), not the installed headers. The 
problem is that the headers that match the current kernel obviously vary if 
the kernel changes, and may not be installed anyway. In this case, just rely 
on kernel <-> userspace API not changing much.

Brad


More information about the linux mailing list