Commit c8942f1f authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

netfilter: Move linux/types.h inclusions outside of #ifdef __KERNEL__

Greg Steuck <greg@nest.cx> points out that some of the netfilter
headers can't be used in userspace without including linux/types.h
first. The headers include their own linux/types.h include statements,
these are stripped by make headers-install because they are inside
#ifdef __KERNEL__ however. Move them out to fix this.

Reported and Tested by Greg Steuck.
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4da51056
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/init.h> #include <linux/init.h>
#include <linux/types.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/net.h> #include <linux/net.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
...@@ -14,6 +13,7 @@ ...@@ -14,6 +13,7 @@
#include <linux/list.h> #include <linux/list.h>
#include <net/net_namespace.h> #include <net/net_namespace.h>
#endif #endif
#include <linux/types.h>
#include <linux/compiler.h> #include <linux/compiler.h>
/* Responses from hook functions. */ /* Responses from hook functions. */
......
...@@ -11,11 +11,11 @@ ...@@ -11,11 +11,11 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/if.h> #include <linux/if.h>
#include <linux/types.h>
#include <linux/in.h> #include <linux/in.h>
#include <linux/if_arp.h> #include <linux/if_arp.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#endif #endif
#include <linux/types.h>
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/netfilter_arp.h> #include <linux/netfilter_arp.h>
......
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/if.h> #include <linux/if.h>
#include <linux/types.h>
#include <linux/in.h> #include <linux/in.h>
#include <linux/ip.h> #include <linux/ip.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#endif #endif
#include <linux/types.h>
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/netfilter_ipv4.h> #include <linux/netfilter_ipv4.h>
......
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/if.h> #include <linux/if.h>
#include <linux/types.h>
#include <linux/in6.h> #include <linux/in6.h>
#include <linux/ipv6.h> #include <linux/ipv6.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#endif #endif
#include <linux/types.h>
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/netfilter_ipv6.h> #include <linux/netfilter_ipv6.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment