ebtables carries a private copy of some system headers provided by the kernel-headers package. These were mostly still being included with angle brackets as though they were in the /usr/include tree. Normally-configuerd gcc picks up the local header in these cases. With gcc configured as a cross-compiler, we now have a documented and reproducable case where the use of angle brackets forces the use of headers in system locations, causing errors including: > libebtc.c: In function `ebt_register_match': > libebtc.c:1215:9: error: `union <anonymous>' has no member named `revision' > Makefile:75: recipe for target 'libebtc.o' failed The project encountering this problem is https://bitbucket.org/kille72/freshtomato-arm This is an active project with 2 commits in the last 24hrs ATOW. gcc version: > arm-brcm-linux-uclibcgnueabi-gcc --version > arm-brcm-linux-uclibcgnueabi-gcc (Buildroot 2012.02) 4.5.3 > Copyright (C) 2010 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. The freshtomato developers have been taking ebtables snapshots and patching those #include statements that actually fail. This results in some system headers being included in lieu of local copies so this patch fixes all #include statements. To reproduce: if necessary run up a Debian or Ubuntu VM (I used Ubuntu 18.04). Follow the instructions at the URL. Replace ebtables with the one from git. Enter "make distclean && make r7000e". I think you need to "apt install" some extra packages to progress to the ebtables fail. You do need to "apt install gperf" to finish the build with a fixed ebtables. Reported-by: Edriss Mirzadeh <edriss@xxxxxxxxx> Signed-off-by: Duncan Roe <duncan_roe@xxxxxxxxxxxxxxx> --- examples/ulog/test_ulog.c | 2 +- extensions/ebt_802_3.c | 2 +- extensions/ebt_among.c | 2 +- extensions/ebt_arp.c | 2 +- extensions/ebt_arpreply.c | 2 +- extensions/ebt_ip.c | 2 +- extensions/ebt_ip6.c | 2 +- extensions/ebt_limit.c | 2 +- extensions/ebt_log.c | 2 +- extensions/ebt_mark.c | 2 +- extensions/ebt_mark_m.c | 2 +- extensions/ebt_nat.c | 2 +- extensions/ebt_nflog.c | 2 +- extensions/ebt_pkttype.c | 2 +- extensions/ebt_redirect.c | 2 +- extensions/ebt_stp.c | 2 +- extensions/ebt_ulog.c | 2 +- extensions/ebt_vlan.c | 2 +- include/ebtables_u.h | 2 +- include/linux/netfilter_bridge/ebt_802_3.h | 2 +- include/linux/netfilter_bridge/ebt_among.h | 2 +- include/linux/netfilter_bridge/ebt_arp.h | 2 +- include/linux/netfilter_bridge/ebt_ip.h | 2 +- include/linux/netfilter_bridge/ebt_ip6.h | 2 +- include/linux/netfilter_bridge/ebt_limit.h | 2 +- include/linux/netfilter_bridge/ebt_log.h | 2 +- include/linux/netfilter_bridge/ebt_mark_m.h | 2 +- include/linux/netfilter_bridge/ebt_nflog.h | 2 +- include/linux/netfilter_bridge/ebt_pkttype.h | 2 +- include/linux/netfilter_bridge/ebt_stp.h | 2 +- include/linux/netfilter_bridge/ebt_ulog.h | 2 +- include/linux/netfilter_bridge/ebt_vlan.h | 2 +- include/linux/netfilter_bridge/ebtables.h | 4 ++-- 33 files changed, 34 insertions(+), 34 deletions(-) diff --git a/examples/ulog/test_ulog.c b/examples/ulog/test_ulog.c index fbbd909..909a58a 100644 --- a/examples/ulog/test_ulog.c +++ b/examples/ulog/test_ulog.c @@ -43,7 +43,7 @@ #include <netinet/ip_icmp.h> #include "../../include/ebtables_u.h" #include "../../include/ethernetdb.h" -#include <linux/netfilter_bridge/ebt_ulog.h> +#include "linux/netfilter_bridge/ebt_ulog.h" /* <linux/if_vlan.h> doesn't hand this to userspace :-( */ #define VLAN_HLEN 4 diff --git a/extensions/ebt_802_3.c b/extensions/ebt_802_3.c index 4584849..3aa7ebe 100644 --- a/extensions/ebt_802_3.c +++ b/extensions/ebt_802_3.c @@ -12,7 +12,7 @@ #include <getopt.h> #include "../include/ebtables_u.h" #include "../include/ethernetdb.h" -#include <linux/netfilter_bridge/ebt_802_3.h> +#include "linux/netfilter_bridge/ebt_802_3.h" #define _802_3_SAP '1' #define _802_3_TYPE '2' diff --git a/extensions/ebt_among.c b/extensions/ebt_among.c index e4fc5ac..ea93d5f 100644 --- a/extensions/ebt_among.c +++ b/extensions/ebt_among.c @@ -16,7 +16,7 @@ #include <netinet/ether.h> #include "../include/ethernetdb.h" #include <linux/if_ether.h> -#include <linux/netfilter_bridge/ebt_among.h> +#include "linux/netfilter_bridge/ebt_among.h" #include <sys/mman.h> #include <sys/stat.h> #include <fcntl.h> diff --git a/extensions/ebt_arp.c b/extensions/ebt_arp.c index b281955..f41bfae 100644 --- a/extensions/ebt_arp.c +++ b/extensions/ebt_arp.c @@ -14,7 +14,7 @@ #include "../include/ebtables_u.h" #include "../include/ethernetdb.h" #include <linux/if_ether.h> -#include <linux/netfilter_bridge/ebt_arp.h> +#include "linux/netfilter_bridge/ebt_arp.h" #define ARP_OPCODE '1' #define ARP_HTYPE '2' diff --git a/extensions/ebt_arpreply.c b/extensions/ebt_arpreply.c index 51eda66..6bf93fe 100644 --- a/extensions/ebt_arpreply.c +++ b/extensions/ebt_arpreply.c @@ -13,7 +13,7 @@ #include <getopt.h> #include "../include/ebtables_u.h" #include <netinet/ether.h> -#include <linux/netfilter_bridge/ebt_arpreply.h> +#include "linux/netfilter_bridge/ebt_arpreply.h" static int mac_supplied; diff --git a/extensions/ebt_ip.c b/extensions/ebt_ip.c index 1ffdb95..f2e3623 100644 --- a/extensions/ebt_ip.c +++ b/extensions/ebt_ip.c @@ -16,7 +16,7 @@ #include <getopt.h> #include <netdb.h> #include "../include/ebtables_u.h" -#include <linux/netfilter_bridge/ebt_ip.h> +#include "linux/netfilter_bridge/ebt_ip.h" #define IP_SOURCE '1' #define IP_DEST '2' diff --git a/extensions/ebt_ip6.c b/extensions/ebt_ip6.c index 347797b..57ba250 100644 --- a/extensions/ebt_ip6.c +++ b/extensions/ebt_ip6.c @@ -17,7 +17,7 @@ #include <getopt.h> #include <netdb.h> #include "../include/ebtables_u.h" -#include <linux/netfilter_bridge/ebt_ip6.h> +#include "linux/netfilter_bridge/ebt_ip6.h" diff --git a/extensions/ebt_limit.c b/extensions/ebt_limit.c index 2cbf4de..8ce7720 100644 --- a/extensions/ebt_limit.c +++ b/extensions/ebt_limit.c @@ -14,7 +14,7 @@ #include <getopt.h> #include <errno.h> #include "../include/ebtables_u.h" -#include <linux/netfilter_bridge/ebt_limit.h> +#include "linux/netfilter_bridge/ebt_limit.h" #define EBT_LIMIT_AVG "3/hour" #define EBT_LIMIT_BURST 5 diff --git a/extensions/ebt_log.c b/extensions/ebt_log.c index 97d5091..c95f2f1 100644 --- a/extensions/ebt_log.c +++ b/extensions/ebt_log.c @@ -11,7 +11,7 @@ #include <string.h> #include <getopt.h> #include "../include/ebtables_u.h" -#include <linux/netfilter_bridge/ebt_log.h> +#include "linux/netfilter_bridge/ebt_log.h" /* * copied from syslog.h diff --git a/extensions/ebt_mark.c b/extensions/ebt_mark.c index 4cf1378..5430b14 100644 --- a/extensions/ebt_mark.c +++ b/extensions/ebt_mark.c @@ -11,7 +11,7 @@ #include <string.h> #include <getopt.h> #include "../include/ebtables_u.h" -#include <linux/netfilter_bridge/ebt_mark_t.h> +#include "linux/netfilter_bridge/ebt_mark_t.h" static int mark_supplied; diff --git a/extensions/ebt_mark_m.c b/extensions/ebt_mark_m.c index 7561f05..5f5c02f 100644 --- a/extensions/ebt_mark_m.c +++ b/extensions/ebt_mark_m.c @@ -11,7 +11,7 @@ #include <string.h> #include <getopt.h> #include "../include/ebtables_u.h" -#include <linux/netfilter_bridge/ebt_mark_m.h> +#include "linux/netfilter_bridge/ebt_mark_m.h" #define MARK '1' diff --git a/extensions/ebt_nat.c b/extensions/ebt_nat.c index 00d9cd4..a9e1941 100644 --- a/extensions/ebt_nat.c +++ b/extensions/ebt_nat.c @@ -12,7 +12,7 @@ #include <getopt.h> #include "../include/ebtables_u.h" #include <netinet/ether.h> -#include <linux/netfilter_bridge/ebt_nat.h> +#include "linux/netfilter_bridge/ebt_nat.h" static int to_source_supplied, to_dest_supplied; diff --git a/extensions/ebt_nflog.c b/extensions/ebt_nflog.c index 405673a..94a1a12 100644 --- a/extensions/ebt_nflog.c +++ b/extensions/ebt_nflog.c @@ -15,7 +15,7 @@ #include <string.h> #include <getopt.h> #include "../include/ebtables_u.h" -#include <linux/netfilter_bridge/ebt_nflog.h> +#include "linux/netfilter_bridge/ebt_nflog.h" enum { NFLOG_GROUP = 0x1, diff --git a/extensions/ebt_pkttype.c b/extensions/ebt_pkttype.c index 486c85c..2ce7b5f 100644 --- a/extensions/ebt_pkttype.c +++ b/extensions/ebt_pkttype.c @@ -13,7 +13,7 @@ #include <netdb.h> #include "../include/ebtables_u.h" #include <linux/if_packet.h> -#include <linux/netfilter_bridge/ebt_pkttype.h> +#include "linux/netfilter_bridge/ebt_pkttype.h" char *classes[] = { diff --git a/extensions/ebt_redirect.c b/extensions/ebt_redirect.c index 3f8227a..34447db 100644 --- a/extensions/ebt_redirect.c +++ b/extensions/ebt_redirect.c @@ -11,7 +11,7 @@ #include <string.h> #include <getopt.h> #include "../include/ebtables_u.h" -#include <linux/netfilter_bridge/ebt_redirect.h> +#include "linux/netfilter_bridge/ebt_redirect.h" #define REDIRECT_TARGET '1' static const struct option opts[] = diff --git a/extensions/ebt_stp.c b/extensions/ebt_stp.c index 5c5fc33..97636fc 100644 --- a/extensions/ebt_stp.c +++ b/extensions/ebt_stp.c @@ -11,7 +11,7 @@ #include <stdlib.h> #include <getopt.h> #include "../include/ebtables_u.h" -#include <linux/netfilter_bridge/ebt_stp.h> +#include "linux/netfilter_bridge/ebt_stp.h" #define STP_TYPE 'a' #define STP_FLAGS 'b' diff --git a/extensions/ebt_ulog.c b/extensions/ebt_ulog.c index 54eec53..ad347dd 100644 --- a/extensions/ebt_ulog.c +++ b/extensions/ebt_ulog.c @@ -14,7 +14,7 @@ #include <getopt.h> #include "../include/ebtables_u.h" #include <sys/time.h> -#include <linux/netfilter_bridge/ebt_ulog.h> +#include "linux/netfilter_bridge/ebt_ulog.h" #define CP_NO_LIMIT_S "default_cprange" #define CP_NO_LIMIT_N 0 diff --git a/extensions/ebt_vlan.c b/extensions/ebt_vlan.c index 0a37067..7b1704d 100644 --- a/extensions/ebt_vlan.c +++ b/extensions/ebt_vlan.c @@ -14,7 +14,7 @@ #include <ctype.h> #include "../include/ebtables_u.h" #include "../include/ethernetdb.h" -#include <linux/netfilter_bridge/ebt_vlan.h> +#include "linux/netfilter_bridge/ebt_vlan.h" #include <linux/if_ether.h> #define NAME_VLAN_ID "id" diff --git a/include/ebtables_u.h b/include/ebtables_u.h index 3235bf5..512d0a4 100644 --- a/include/ebtables_u.h +++ b/include/ebtables_u.h @@ -25,7 +25,7 @@ #define EBTABLES_U_H #include <netinet/in.h> #include <netinet/ether.h> -#include <linux/netfilter_bridge/ebtables.h> +#include "linux/netfilter_bridge/ebtables.h" #include <linux/netfilter/x_tables.h> #ifndef IPPROTO_SCTP diff --git a/include/linux/netfilter_bridge/ebt_802_3.h b/include/linux/netfilter_bridge/ebt_802_3.h index 70028c1..2fea605 100644 --- a/include/linux/netfilter_bridge/ebt_802_3.h +++ b/include/linux/netfilter_bridge/ebt_802_3.h @@ -1,7 +1,7 @@ #ifndef __LINUX_BRIDGE_EBT_802_3_H #define __LINUX_BRIDGE_EBT_802_3_H -#include <linux/types.h> +#include "linux/types.h" #include <linux/if_ether.h> #define EBT_802_3_SAP 0x01 diff --git a/include/linux/netfilter_bridge/ebt_among.h b/include/linux/netfilter_bridge/ebt_among.h index bd4e3ad..4ce0b07 100644 --- a/include/linux/netfilter_bridge/ebt_among.h +++ b/include/linux/netfilter_bridge/ebt_among.h @@ -1,7 +1,7 @@ #ifndef __LINUX_BRIDGE_EBT_AMONG_H #define __LINUX_BRIDGE_EBT_AMONG_H -#include <linux/types.h> +#include "linux/types.h" #define EBT_AMONG_DST 0x01 #define EBT_AMONG_SRC 0x02 diff --git a/include/linux/netfilter_bridge/ebt_arp.h b/include/linux/netfilter_bridge/ebt_arp.h index 522f3e4..b74108a 100644 --- a/include/linux/netfilter_bridge/ebt_arp.h +++ b/include/linux/netfilter_bridge/ebt_arp.h @@ -1,7 +1,7 @@ #ifndef __LINUX_BRIDGE_EBT_ARP_H #define __LINUX_BRIDGE_EBT_ARP_H -#include <linux/types.h> +#include "linux/types.h" #define EBT_ARP_OPCODE 0x01 #define EBT_ARP_HTYPE 0x02 diff --git a/include/linux/netfilter_bridge/ebt_ip.h b/include/linux/netfilter_bridge/ebt_ip.h index 46d6261..679d1bf 100644 --- a/include/linux/netfilter_bridge/ebt_ip.h +++ b/include/linux/netfilter_bridge/ebt_ip.h @@ -16,7 +16,7 @@ #ifndef __LINUX_BRIDGE_EBT_IP_H #define __LINUX_BRIDGE_EBT_IP_H -#include <linux/types.h> +#include "linux/types.h" #define EBT_IP_SOURCE 0x01 #define EBT_IP_DEST 0x02 diff --git a/include/linux/netfilter_bridge/ebt_ip6.h b/include/linux/netfilter_bridge/ebt_ip6.h index 42b8896..1e97008 100644 --- a/include/linux/netfilter_bridge/ebt_ip6.h +++ b/include/linux/netfilter_bridge/ebt_ip6.h @@ -12,7 +12,7 @@ #ifndef __LINUX_BRIDGE_EBT_IP6_H #define __LINUX_BRIDGE_EBT_IP6_H -#include <linux/types.h> +#include "linux/types.h" #define EBT_IP6_SOURCE 0x01 #define EBT_IP6_DEST 0x02 diff --git a/include/linux/netfilter_bridge/ebt_limit.h b/include/linux/netfilter_bridge/ebt_limit.h index 66d80b3..ec5419a 100644 --- a/include/linux/netfilter_bridge/ebt_limit.h +++ b/include/linux/netfilter_bridge/ebt_limit.h @@ -1,7 +1,7 @@ #ifndef __LINUX_BRIDGE_EBT_LIMIT_H #define __LINUX_BRIDGE_EBT_LIMIT_H -#include <linux/types.h> +#include "linux/types.h" #define EBT_LIMIT_MATCH "limit" diff --git a/include/linux/netfilter_bridge/ebt_log.h b/include/linux/netfilter_bridge/ebt_log.h index 7e7f1d1..9af792a 100644 --- a/include/linux/netfilter_bridge/ebt_log.h +++ b/include/linux/netfilter_bridge/ebt_log.h @@ -1,7 +1,7 @@ #ifndef __LINUX_BRIDGE_EBT_LOG_H #define __LINUX_BRIDGE_EBT_LOG_H -#include <linux/types.h> +#include "linux/types.h" #define EBT_LOG_IP 0x01 /* if the frame is made by ip, log the ip information */ #define EBT_LOG_ARP 0x02 diff --git a/include/linux/netfilter_bridge/ebt_mark_m.h b/include/linux/netfilter_bridge/ebt_mark_m.h index 410f9e5..20083b1 100644 --- a/include/linux/netfilter_bridge/ebt_mark_m.h +++ b/include/linux/netfilter_bridge/ebt_mark_m.h @@ -1,7 +1,7 @@ #ifndef __LINUX_BRIDGE_EBT_MARK_M_H #define __LINUX_BRIDGE_EBT_MARK_M_H -#include <linux/types.h> +#include "linux/types.h" #define EBT_MARK_AND 0x01 #define EBT_MARK_OR 0x02 diff --git a/include/linux/netfilter_bridge/ebt_nflog.h b/include/linux/netfilter_bridge/ebt_nflog.h index df829fc..19291bc 100644 --- a/include/linux/netfilter_bridge/ebt_nflog.h +++ b/include/linux/netfilter_bridge/ebt_nflog.h @@ -1,7 +1,7 @@ #ifndef __LINUX_BRIDGE_EBT_NFLOG_H #define __LINUX_BRIDGE_EBT_NFLOG_H -#include <linux/types.h> +#include "linux/types.h" #define EBT_NFLOG_MASK 0x0 diff --git a/include/linux/netfilter_bridge/ebt_pkttype.h b/include/linux/netfilter_bridge/ebt_pkttype.h index c241bad..7a1c30c 100644 --- a/include/linux/netfilter_bridge/ebt_pkttype.h +++ b/include/linux/netfilter_bridge/ebt_pkttype.h @@ -1,7 +1,7 @@ #ifndef __LINUX_BRIDGE_EBT_PKTTYPE_H #define __LINUX_BRIDGE_EBT_PKTTYPE_H -#include <linux/types.h> +#include "linux/types.h" struct ebt_pkttype_info { __u8 pkt_type; diff --git a/include/linux/netfilter_bridge/ebt_stp.h b/include/linux/netfilter_bridge/ebt_stp.h index 1025b9f..fa513b6 100644 --- a/include/linux/netfilter_bridge/ebt_stp.h +++ b/include/linux/netfilter_bridge/ebt_stp.h @@ -1,7 +1,7 @@ #ifndef __LINUX_BRIDGE_EBT_STP_H #define __LINUX_BRIDGE_EBT_STP_H -#include <linux/types.h> +#include "linux/types.h" #define EBT_STP_TYPE 0x0001 diff --git a/include/linux/netfilter_bridge/ebt_ulog.h b/include/linux/netfilter_bridge/ebt_ulog.h index 89a6bec..0467f8b 100644 --- a/include/linux/netfilter_bridge/ebt_ulog.h +++ b/include/linux/netfilter_bridge/ebt_ulog.h @@ -1,7 +1,7 @@ #ifndef _EBT_ULOG_H #define _EBT_ULOG_H -#include <linux/types.h> +#include "linux/types.h" #define EBT_ULOG_DEFAULT_NLGROUP 0 #define EBT_ULOG_DEFAULT_QTHRESHOLD 1 diff --git a/include/linux/netfilter_bridge/ebt_vlan.h b/include/linux/netfilter_bridge/ebt_vlan.h index 967d1d5..d601752 100644 --- a/include/linux/netfilter_bridge/ebt_vlan.h +++ b/include/linux/netfilter_bridge/ebt_vlan.h @@ -1,7 +1,7 @@ #ifndef __LINUX_BRIDGE_EBT_VLAN_H #define __LINUX_BRIDGE_EBT_VLAN_H -#include <linux/types.h> +#include "linux/types.h" #define EBT_VLAN_ID 0x01 #define EBT_VLAN_PRIO 0x02 diff --git a/include/linux/netfilter_bridge/ebtables.h b/include/linux/netfilter_bridge/ebtables.h index 5be75f2..de7207f 100644 --- a/include/linux/netfilter_bridge/ebtables.h +++ b/include/linux/netfilter_bridge/ebtables.h @@ -13,9 +13,9 @@ #ifndef __LINUX_BRIDGE_EFF_H #define __LINUX_BRIDGE_EFF_H -#include <linux/types.h> +#include "linux/types.h" #include <linux/if.h> -#include <linux/netfilter_bridge.h> +#include "linux/netfilter_bridge.h" #define EBT_TABLE_MAXNAMELEN 32 #define EBT_CHAIN_MAXNAMELEN EBT_TABLE_MAXNAMELEN -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html