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: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Patrick McHardy and committed by David S. Miller c8942f1f 4da51056

+4 -4
+1 -1
include/linux/netfilter.h
··· 3 3 4 4 #ifdef __KERNEL__ 5 5 #include <linux/init.h> 6 - #include <linux/types.h> 7 6 #include <linux/skbuff.h> 8 7 #include <linux/net.h> 9 8 #include <linux/netdevice.h> ··· 13 14 #include <linux/list.h> 14 15 #include <net/net_namespace.h> 15 16 #endif 17 + #include <linux/types.h> 16 18 #include <linux/compiler.h> 17 19 18 20 /* Responses from hook functions. */
+1 -1
include/linux/netfilter_arp/arp_tables.h
··· 11 11 12 12 #ifdef __KERNEL__ 13 13 #include <linux/if.h> 14 - #include <linux/types.h> 15 14 #include <linux/in.h> 16 15 #include <linux/if_arp.h> 17 16 #include <linux/skbuff.h> 18 17 #endif 18 + #include <linux/types.h> 19 19 #include <linux/compiler.h> 20 20 #include <linux/netfilter_arp.h> 21 21
+1 -1
include/linux/netfilter_ipv4/ip_tables.h
··· 17 17 18 18 #ifdef __KERNEL__ 19 19 #include <linux/if.h> 20 - #include <linux/types.h> 21 20 #include <linux/in.h> 22 21 #include <linux/ip.h> 23 22 #include <linux/skbuff.h> 24 23 #endif 24 + #include <linux/types.h> 25 25 #include <linux/compiler.h> 26 26 #include <linux/netfilter_ipv4.h> 27 27
+1 -1
include/linux/netfilter_ipv6/ip6_tables.h
··· 17 17 18 18 #ifdef __KERNEL__ 19 19 #include <linux/if.h> 20 - #include <linux/types.h> 21 20 #include <linux/in6.h> 22 21 #include <linux/ipv6.h> 23 22 #include <linux/skbuff.h> 24 23 #endif 24 + #include <linux/types.h> 25 25 #include <linux/compiler.h> 26 26 #include <linux/netfilter_ipv6.h> 27 27