linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Fwd: [PATCH] missing __KERNEL__ ifdef in include/linux/device.h]
@ 2003-07-20  3:59 Jeff Garzik
  2003-07-20  6:19 ` Christoph Hellwig
  2003-07-20  6:25 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Jeff Garzik @ 2003-07-20  3:59 UTC (permalink / raw)
  To: LKML

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: [PATCH] missing __KERNEL__ ifdef in include/linux/device.h --]
[-- Type: message/rfc822, Size: 2824 bytes --]

From: Thomas Graf <tgraf@suug.ch>
To: netdev@oss.sgi.com
Subject: [PATCH] missing __KERNEL__ ifdef in include/linux/device.h
Date: Sun, 20 Jul 2003 04:55:29 +0200
Message-ID: <20030720025528.GA30577@rei.rakuen>

Hello

device.h should be protected with __KERNEL__ because it uses
__KERNEL__ protected structures. Userspace applications
including if_arp.h such as iproute2 will fail because
it finally includes device.h as well.

 - thomas


Index: include/linux/device.h
===================================================================
RCS file: /cvs/tgr/linux-25/include/linux/device.h,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 device.h
--- include/linux/device.h	10 Jul 2003 22:58:31 -0000	1.1.1.2
+++ include/linux/device.h	20 Jul 2003 02:49:12 -0000
@@ -8,7 +8,7 @@
  * See Documentation/driver-model/ for more information.
  */
 
-#ifndef _DEVICE_H_
+#if defined __KERNEL__ && !defined _DEVICE_H_
 #define _DEVICE_H_
 
 #include <linux/config.h>





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Fwd: [PATCH] missing __KERNEL__ ifdef in include/linux/device.h]
  2003-07-20  3:59 [Fwd: [PATCH] missing __KERNEL__ ifdef in include/linux/device.h] Jeff Garzik
@ 2003-07-20  6:19 ` Christoph Hellwig
  2003-07-20  6:25 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2003-07-20  6:19 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: LKML

On Sat, Jul 19, 2003 at 11:59:23PM -0400, Jeff Garzik wrote:

> Date: Sun, 20 Jul 2003 04:55:29 +0200
> From: Thomas Graf <tgraf@suug.ch>
> Subject: [PATCH] missing __KERNEL__ ifdef in include/linux/device.h
> To: netdev@oss.sgi.com
> 
> Hello
> 
> device.h should be protected with __KERNEL__ because it uses
> __KERNEL__ protected structures. Userspace applications
> including if_arp.h such as iproute2 will fail because
> it finally includes device.h as well.

This is b0rked.  People shouldn't include kernel headers from userspace
for one thing, and if you want to share a single copy of a header for
userspace and kernelspace you have to take of the ifdefs yourself if
including kernel-only headers such as device.h


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Fwd: [PATCH] missing __KERNEL__ ifdef in include/linux/device.h]
  2003-07-20  3:59 [Fwd: [PATCH] missing __KERNEL__ ifdef in include/linux/device.h] Jeff Garzik
  2003-07-20  6:19 ` Christoph Hellwig
@ 2003-07-20  6:25 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2003-07-20  6:25 UTC (permalink / raw)
  To: Jeff Garzik, tgraf; +Cc: LKML

On Sat, Jul 19, 2003 at 11:59:23PM -0400, Jeff Garzik wrote:

> Subject: [PATCH] missing __KERNEL__ ifdef in include/linux/device.h

Ick, I don't want to see the "No kernel headers in userspace programs"
thread again.

So don't do it, device.h doesn't need to be changed.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-07-20  6:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-20  3:59 [Fwd: [PATCH] missing __KERNEL__ ifdef in include/linux/device.h] Jeff Garzik
2003-07-20  6:19 ` Christoph Hellwig
2003-07-20  6:25 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).