Fix userspace export of <linux/net.h>

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Tuesday, August 26, 2008 - 12:00 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5770a3...
Commit:     5770a3fb5f8544d40ae03b010318345cdd05d662
Parent:     b22dfb735a019a721117e713968c1ddf60ee6142
Author:     David Woodhouse <dwmw2@infradead.org>
AuthorDate: Tue Aug 26 15:29:22 2008 +0100
Committer:  Linus Torvalds <torvalds@linux-foundation.org>
CommitDate: Tue Aug 26 10:37:20 2008 -0700

    Fix userspace export of <linux/net.h>
    
    Including <linux/fcntl.h> in the user-visible part of this header has
    caused build regressions with headers from 2.6.27-rc. Move it down to
    the #ifdef __KERNEL__ part, which is the only place it's needed. Move
    some other kernel-only things down there too, while we're at it.
    
    Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 include/linux/net.h |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/linux/net.h b/include/linux/net.h
index 4a9a30f..6dc14a2 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -18,16 +18,9 @@
 #ifndef _LINUX_NET_H
 #define _LINUX_NET_H
 
-#include <linux/wait.h>
 #include <linux/socket.h>
-#include <linux/fcntl.h>	/* For O_CLOEXEC and O_NONBLOCK */
 #include <asm/socket.h>
 
-struct poll_table_struct;
-struct pipe_inode_info;
-struct inode;
-struct net;
-
 #define NPROTO		AF_MAX
 
 #define SYS_SOCKET	1		/* sys_socket(2)		*/
@@ -62,6 +55,13 @@ typedef enum {
 #ifdef __KERNEL__
 #include <linux/stringify.h>
 #include <linux/random.h>
+#include <linux/wait.h>
+#include <linux/fcntl.h>	/* For O_CLOEXEC and O_NONBLOCK */
+
+struct poll_table_struct;
+struct pipe_inode_info;
+struct inode;
+struct net;
 
 #define SOCK_ASYNC_NOSPACE	0
 #define SOCK_ASYNC_WAITDATA	1
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Fix userspace export of <linux/net.h>, Linux Kernel Mailing ..., (Tue Aug 26, 12:00 pm)