lkml.org 
[lkml]   [1999]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: includes linux/lp.h or linux/wait.h inconsistent outside kernel
    From: Stanislav Brabec <utx@k332.feld.cvut.cz>

compiling tunelp I have found inconsistency of headers __outside__ kernel.
The trouble is in skipping of definition wait_queue_head_t.

Following not works outside kernel:
#include <linux/lp.h>

Following works:
#define __KERNEL__
#include <linux/wait.h>
#undef __KERNEL__
#include <linux/lp.h>

(1)

As has been said already many times, anyone who uses
#include <linux/foo.h>
is going to be burnt.
Linux kernel headers are meant for the Linux kernel,
and each and every program in user space that uses them
*will* break sooner or later.

(2)

In this particular case I can tell you that tunelp.c includes
a private lp.h in util-linux-2.9s but that doesnt help you too
much since that has not been released yet. (This week..)
It also uses a private lp.h in andrea's tunelp, which is available now.

(3)

You can very easily fix it yourself by copying /usr/include/linux/lp.h
to a local directory and removing all structure definitions for the kernel,
keeping only the definitions of the manifest constants used by tunelp.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.022 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site