kernel headers

Mark Ellis mark.uzumati at virgin.net
Fri Sep 6 06:39:27 PDT 2002


On 2002.09.06 14:14 Matthias Benkmann wrote:
> On Fri, 06 Sep 2002 07:22:41 -0400 Richard <rkm at usol.com> wrote:
> 
> > <linux/kernel.h>
> > <linux/module.h>
> > <linux/modversions.h>
> >
> > I assumed that these header files should be in the directory
> > /usr/include/linux,
> 
> Kernel modules are supposed to be built as part of the kernel, so
> these
> includes refer to the kernel tree's include directory (e.g.
> /usr/src/linux/include). /usr/include/linux carries system wide
> headers
> used by glibc and ONLY glibc stuff should ever include these headers
> under
> normal circumstances.
> A kernel module MUST NEVER use the includes from /usr/include/linux.

I couldn't agree more.

> The example also shows why a program using (i.e. relying on its
> contents
> rather than its pure existence) autoconf.h from /usr/include/linux is
> broken and needs to be fixed. It is kernel specific and there's no
> guarantee it contains useful information relating to the running
> kernel.
> 

The reason i started this was that microcode_ctl is a userspace program
that interacts with a kernel module. So should it go for headers in
/usr/include or /lib/modules...blah ?

Mark
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list