Ibook kernel headers

Tim Seufert yellowdog-general@lists.terrasoftsolutions.com
Wed Feb 19 14:25:01 2003


On Wednesday, February 19, 2003, at 06:53  AM, Stefan Bruda wrote:

> In fact, the "symbolic links" in /usr/include you talk about are not
> symbolic links at all in the default YDL distributions.  They are
> directories, holding a separate set of headers!  So you _have_ to
> screw around with them, namely delete the directories and establish
> symbolic links to the kernel source.

In most cases you should leave the distribution headers in /usr/include 
alone, even if you do compile a new kernel.  Kernel headers are for the 
kernel; userland programs are NOT supposed to use them directly.  If 
you look at the actual header files, most of them are worthless outside 
the kernel context.  Of those which aren't, you are really still 
supposed to use glibc as your interface to the kernel instead of 
grabbing one of the kernel headers.  And finally, realize that the 
kernel generally keeps external interfaces binary compatible for a long 
time, so you don't need to keep headers in sync in the vast majority of 
cases (if this was not true, you'd have to upgrade glibc a lot more).

The fact that there is a /usr/include/linux at all is a symptom of 
years of bad practice by some userland developers.  YDL is doing the 
right thing by not even making those directories symlinks.

Compiling kernel modules is different, since they are part of the 
kernel and do in fact need access to the real header files.  However, 
most modules do not look at /usr/include/linux, so once again there 
should be no need to change it.