On Thu, 2008-07-24 at 23:08 +0000, Linux Kernel Mailing List wrote:Hm. This leads to errors such as the ones shown at http://koji.fedoraproject.org/koji/getfile?taskID=785282&name=build.log In file included from /usr/include/asm/fcntl.h:1, from /usr/include/linux/fcntl.h:4, from /usr/include/linux/net.h:23, from gen_tables.c:28: /usr/include/asm-generic/fcntl.h:120: error: expected specifier-qualifier-list before 'off_t' /usr/include/asm-generic/fcntl.h:143: error: expected specifier-qualifier-list before 'loff_t' You don't need to include <linux/fcntl.h> in the !__KERNEL__ case, so that inclusion should probably live within the existing #ifdef __KERNEL__, so we don't pull <linux/fcntl.h> in where it's not needed. ----- Subject: 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> 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 -- David Woodhouse Open Source Technology Centre David.Woodhouse@intel.com Intel Corporation --
| Greg Kroah-Hartman | [PATCH 006/196] Chinese: add translation of oops-tracing.txt |
| Andrew Morton | Re: -mm merge plans for 2.6.23 -- sys_fallocate |
| Eric W. Biederman | [PATCH] nfs lockd reclaimer: Convert to kthread API |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
git: | |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 03/37] dccp: List management for new feature negotiation |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
