Add missing header dependencies and other small changes so that each file compiles alone in userspace.
Unified · Split
| @@ -1,6 +1,8 @@ | ||
| 1 | 1 | #ifndef _UAPI__IP_SET_BITMAP_H |
| 2 | 2 | #define _UAPI__IP_SET_BITMAP_H |
| 3 | 3 | |
| 4 | +#include <linux/netfilter/ipset/ip_set.h> | |
| 5 | + | |
| 4 | 6 | /* Bitmap type specific error codes */ |
| 5 | 7 | enum { |
| 6 | 8 | /* The element is out of the range of the set */ |
| @@ -1,6 +1,8 @@ | ||
| 1 | 1 | #ifndef _UAPI__IP_SET_HASH_H |
| 2 | 2 | #define _UAPI__IP_SET_HASH_H |
| 3 | 3 | |
| 4 | +#include <linux/netfilter/ipset/ip_set.h> | |
| 5 | + | |
| 4 | 6 | /* Hash type specific error codes */ |
| 5 | 7 | enum { |
| 6 | 8 | /* Hash is full */ |
| @@ -1,6 +1,8 @@ | ||
| 1 | 1 | #ifndef _UAPI__IP_SET_LIST_H |
| 2 | 2 | #define _UAPI__IP_SET_LIST_H |
| 3 | 3 | |
| 4 | +#include <linux/netfilter/ipset/ip_set.h> | |
| 5 | + | |
| 4 | 6 | /* List type specific error codes */ |
| 5 | 7 | enum { |
| 6 | 8 | /* Set name to be added/deleted/tested does not exist. */ |
| @@ -1,6 +1,9 @@ | ||
| 1 | 1 | #ifndef _NF_CONNTRACK_TUPLE_COMMON_H |
| 2 | 2 | #define _NF_CONNTRACK_TUPLE_COMMON_H |
| 3 | 3 | |
| 4 | +#include <linux/types.h> | |
| 5 | +#include <linux/netfilter.h> | |
| 6 | + | |
| 4 | 7 | enum ip_conntrack_dir { |
| 5 | 8 | IP_CT_DIR_ORIGINAL, |
| 6 | 9 | IP_CT_DIR_REPLY, |
| @@ -2,6 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #define XT_HMARK_H_ |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | +#include <linux/netfilter.h> | |
| 5 | 6 | |
| 6 | 7 | enum { |
| 7 | 8 | XT_HMARK_SADDR_MASK, |
| @@ -2,6 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #define _XT_RATEEST_TARGET_H |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | +#include <linux/if.h> | |
| 5 | 6 | |
| 6 | 7 | struct xt_rateest_target_info { |
| 7 | 8 | char name[IFNAMSIZ]; |
| @@ -1,6 +1,8 @@ | ||
| 1 | 1 | #ifndef _XT_TEE_TARGET_H |
| 2 | 2 | #define _XT_TEE_TARGET_H |
| 3 | 3 | |
| 4 | +#include <linux/netfilter.h> | |
| 5 | + | |
| 4 | 6 | struct xt_tee_tginfo { |
| 5 | 7 | union nf_inet_addr gw; |
| 6 | 8 | char oif[16]; |
| @@ -2,6 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #define _XT_TPROXY_H |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | +#include <linux/netfilter.h> | |
| 5 | 6 | |
| 6 | 7 | /* TPROXY target is capable of marking the packet to perform |
| 7 | 8 | * redirection. We can get rid of that whenever we get support for |
| @@ -2,6 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #define _UAPI_XT_HASHLIMIT_H |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | +#include <linux/if.h> | |
| 5 | 6 | |
| 6 | 7 | /* timings are in milliseconds. */ |
| 7 | 8 | #define XT_HASHLIMIT_SCALE 10000 |
| @@ -2,6 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #define _XT_IPVS_H |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | +#include <linux/netfilter.h> | |
| 5 | 6 | |
| 6 | 7 | enum { |
| 7 | 8 | XT_IPVS_IPVS_PROPERTY = 1 << 0, /* all other options imply this one */ |
| @@ -1,6 +1,8 @@ | ||
| 1 | 1 | #ifndef _XT_MAC_H |
| 2 | 2 | #define _XT_MAC_H |
| 3 | 3 | |
| 4 | +#include <linux/if_ether.h> | |
| 5 | + | |
| 4 | 6 | struct xt_mac_info { |
| 5 | 7 | unsigned char srcaddr[ETH_ALEN]; |
| 6 | 8 | int invert; |
| @@ -20,6 +20,8 @@ · 19 unmodified lines | ||
| 20 | 20 | #define _XT_OSF_H |
| 21 | 21 | |
| 22 | 22 | #include <linux/types.h> |
| 23 | +#include <linux/ip.h> | |
| 24 | +#include <linux/tcp.h> | |
| 23 | 25 | |
| 24 | 26 | #define MAXGENRELEN 32 |
| 25 | 27 | |
| @@ -2,7 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #define _UAPI_XT_PHYSDEV_H |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | − | |
| 5 | +#include <linux/if.h> | |
| 6 | 6 | |
| 7 | 7 | #define XT_PHYSDEV_OP_IN 0x01 |
| 8 | 8 | #define XT_PHYSDEV_OP_OUT 0x02 |
| @@ -2,6 +2,8 @@ · 1 unmodified line | ||
| 2 | 2 | #define _XT_POLICY_H |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | +#include <linux/in.h> | |
| 6 | +#include <linux/in6.h> | |
| 5 | 7 | |
| 6 | 8 | #define XT_POLICY_MAX_ELEM 4 |
| 7 | 9 | |
| @@ -2,6 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #define _XT_RATEEST_MATCH_H |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | +#include <linux/if.h> | |
| 5 | 6 | |
| 6 | 7 | enum xt_rateest_match_flags { |
| 7 | 8 | XT_RATEEST_MATCH_INVERT = 1<<0, |
| @@ -2,6 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #define _LINUX_NETFILTER_XT_RECENT_H 1 |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | +#include <linux/netfilter.h> | |
| 5 | 6 | |
| 6 | 7 | enum { |
| 7 | 8 | XT_RECENT_CHECK = 1 << 0, |
| @@ -66,26 +66,26 @@ struct xt_sctp_info { · 65 unmodified lines | ||
| 66 | 66 | |
| 67 | 67 | #define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) \ |
| 68 | 68 | __sctp_chunkmap_is_clear((chunkmap), ARRAY_SIZE(chunkmap)) |
| 69 | −static inline bool | |
| 69 | +static inline _Bool | |
| 70 | 70 | __sctp_chunkmap_is_clear(const __u32 *chunkmap, unsigned int n) |
| 71 | 71 | { |
| 72 | 72 | unsigned int i; |
| 73 | 73 | for (i = 0; i < n; ++i) |
| 74 | 74 | if (chunkmap[i]) |
| 75 | − return false; | |
| 76 | − return true; | |
| 75 | + return 0; | |
| 76 | + return 1; | |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | #define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) \ |
| 80 | 80 | __sctp_chunkmap_is_all_set((chunkmap), ARRAY_SIZE(chunkmap)) |
| 81 | −static inline bool | |
| 81 | +static inline _Bool | |
| 82 | 82 | __sctp_chunkmap_is_all_set(const __u32 *chunkmap, unsigned int n) |
| 83 | 83 | { |
| 84 | 84 | unsigned int i; |
| 85 | 85 | for (i = 0; i < n; ++i) |
| 86 | 86 | if (chunkmap[i] != ~0U) |
| 87 | − return false; | |
| 88 | − return true; | |
| 87 | + return 0; | |
| 88 | + return 1; | |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | #endif /* _XT_SCTP_H_ */ |
| @@ -11,6 +11,7 @@ · 10 unmodified lines | ||
| 11 | 11 | |
| 12 | 12 | #include <linux/types.h> |
| 13 | 13 | #include <linux/compiler.h> |
| 14 | +#include <linux/if.h> | |
| 14 | 15 | #include <linux/netfilter_arp.h> |
| 15 | 16 | |
| 16 | 17 | #include <linux/netfilter/x_tables.h> |
| @@ -4,6 +4,7 @@ · 3 unmodified lines | ||
| 4 | 4 | /* bridge-specific defines for netfilter. |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | +#include <linux/in.h> | |
| 7 | 8 | #include <linux/netfilter.h> |
| 8 | 9 | #include <linux/if_ether.h> |
| 9 | 10 | #include <linux/if_vlan.h> |
| @@ -2,6 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #define __LINUX_BRIDGE_EBT_ARP_H |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | +#include <linux/if_ether.h> | |
| 5 | 6 | |
| 6 | 7 | #define EBT_ARP_OPCODE 0x01 |
| 7 | 8 | #define EBT_ARP_HTYPE 0x02 |
| @@ -1,6 +1,8 @@ | ||
| 1 | 1 | #ifndef __LINUX_BRIDGE_EBT_ARPREPLY_H |
| 2 | 2 | #define __LINUX_BRIDGE_EBT_ARPREPLY_H |
| 3 | 3 | |
| 4 | +#include <linux/if_ether.h> | |
| 5 | + | |
| 4 | 6 | struct ebt_arpreply_info { |
| 5 | 7 | unsigned char mac[ETH_ALEN]; |
| 6 | 8 | int target; |
| @@ -13,6 +13,7 @@ · 12 unmodified lines | ||
| 13 | 13 | #define __LINUX_BRIDGE_EBT_IP6_H |
| 14 | 14 | |
| 15 | 15 | #include <linux/types.h> |
| 16 | +#include <linux/in6.h> | |
| 16 | 17 | |
| 17 | 18 | #define EBT_IP6_SOURCE 0x01 |
| 18 | 19 | #define EBT_IP6_DEST 0x02 |
| @@ -1,6 +1,8 @@ | ||
| 1 | 1 | #ifndef __LINUX_BRIDGE_EBT_NAT_H |
| 2 | 2 | #define __LINUX_BRIDGE_EBT_NAT_H |
| 3 | 3 | |
| 4 | +#include <linux/if_ether.h> | |
| 5 | + | |
| 4 | 6 | #define NAT_ARP_BIT (0x00000010) |
| 5 | 7 | struct ebt_nat_info { |
| 6 | 8 | unsigned char mac[ETH_ALEN]; |
| @@ -17,6 +17,7 @@ · 16 unmodified lines | ||
| 17 | 17 | |
| 18 | 18 | #include <linux/types.h> |
| 19 | 19 | #include <linux/compiler.h> |
| 20 | +#include <linux/if.h> | |
| 20 | 21 | #include <linux/netfilter_ipv4.h> |
| 21 | 22 | |
| 22 | 23 | #include <linux/netfilter/x_tables.h> |
| @@ -17,6 +17,7 @@ · 16 unmodified lines | ||
| 17 | 17 | |
| 18 | 18 | #include <linux/types.h> |
| 19 | 19 | #include <linux/compiler.h> |
| 20 | +#include <linux/if.h> | |
| 20 | 21 | #include <linux/netfilter_ipv6.h> |
| 21 | 22 | |
| 22 | 23 | #include <linux/netfilter/x_tables.h> |
| @@ -2,7 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #define _IP6T_RT_H |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | −/*#include <linux/in6.h>*/ | |
| 5 | +#include <linux/in6.h> | |
| 6 | 6 | |
| 7 | 7 | #define IP6T_RT_HOPS 16 |
| 8 | 8 | |