linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wireless.h: improve userland include-ability
@ 2008-06-03 17:51 John W. Linville
  2008-06-03 19:05 ` David Miller
  0 siblings, 1 reply; 12+ messages in thread
From: John W. Linville @ 2008-06-03 17:51 UTC (permalink / raw)
  To: linux-wireless; +Cc: Kirill A. Shutemov, John W. Linville

From: Kirill A. Shutemov <kirill@shutemov.name>

This patch partially reverts commit 2218228392080f0ca2fc2974604e79f57b12c436
("Make linux/wireless.h be able to compile") while still making it
easier to include wireless.h in userland apps.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 include/linux/wireless.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/linux/wireless.h b/include/linux/wireless.h
index 0a9b5b4..9c0b89c 100644
--- a/include/linux/wireless.h
+++ b/include/linux/wireless.h
@@ -70,8 +70,14 @@
 /***************************** INCLUDES *****************************/
 
 #include <linux/types.h>		/* for __u* and __s* typedefs */
+
+/* This header is used in user-space, therefore need to be sanitised
+ * for that purpose. Those includes are usually not compatible with glibc.
+ * To know which includes to use in user-space, check iwlib.h. */
+#ifdef __KERNEL__
 #include <linux/socket.h>		/* for "struct sockaddr" et al	*/
 #include <linux/if.h>			/* for IFNAMSIZ and co... */
+#endif	/* __KERNEL__ */
 
 /***************************** VERSION *****************************/
 /*
-- 
1.5.5.1


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

end of thread, other threads:[~2008-06-04 17:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-03 17:51 [PATCH] wireless.h: improve userland include-ability John W. Linville
2008-06-03 19:05 ` David Miller
2008-06-04 13:52   ` David Woodhouse
2008-06-04 14:23     ` Kirill A. Shutemov
2008-06-04 14:26       ` David Woodhouse
2008-06-04 14:56         ` David Woodhouse
2008-06-04 15:02     ` David Miller
2008-06-04 15:26       ` David Woodhouse
2008-06-04 15:47         ` David Miller
2008-06-04 15:50           ` David Woodhouse
2008-06-04 15:24     ` Pavel Roskin
2008-06-04 17:34       ` John W. Linville

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).