using linux kernel headers in KDE code

Ismail Donmez ismail at kde.org.tr
Sat Apr 30 07:05:22 BST 2005


On Saturday 30 April 2005 00:36, Matt Rogers wrote:
> Hi,
>
> Kopete will soon be gaining support for reading from people's video devices
> via the linux Video4Linux interface and will therefore have to make use of
> some kernel headers. so far, the code i've gotten does the following:
>
> #include <asm/types.h>
> #include <linux/fs.h>
> #include <linux/kernel.h>
> #include <linux/videodev2.h>
>
> obviously, not all of those are needed, and i'm not looking for a critique
> of what headers should be #included and which ones shouldn't. What I _am_
> looking for though, is a clarification as to whether the linux specific
> headers should be copied into kde's cvs or whether we should just use
> whatever headers are installed. i remember there being problems with linux
> kernel headers with kde in past, hence the reason for wanting the
> clarification.

Including linux kernel headers into userspace apps is always a bad idea 
because when a problem happens kernel hackers will tell you "Do not ever 
include kernel headers in userspace". But if you have to do this ( and you 
have to because you need to access video device apparently ) never include 
asm/foo.h but include linux/foo.h equivalent.

ismail




More information about the kde-core-devel mailing list