53e11130035831016cf281098b41e176f0091104
[openwrt/staging/aparcar.git] /
1 From 51d374ba41ae4f1bb851228c06b030b83dd2092f Mon Sep 17 00:00:00 2001
2 From: Baruch Siach <baruch@tkos.co.il>
3 Date: Tue, 13 Nov 2018 19:22:08 +0200
4 Subject: ebtables: vlan: fix userspace/kernel headers collision
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Build with musl libc fails because of conflicting struct ethhdr
10 definitions:
11
12 In file included from .../sysroot/usr/include/net/ethernet.h:10:0,
13 from ../iptables/nft-bridge.h:8,
14 from libebt_vlan.c:18:
15 .../sysroot/usr/include/netinet/if_ether.h:107:8: error: redefinition of ‘struct ethhdr’
16 struct ethhdr {
17 ^~~~~~
18 In file included from libebt_vlan.c:16:0:
19 .../sysroot/usr/include/linux/if_ether.h:160:8: note: originally defined here
20 struct ethhdr {
21 ^~~~~~
22
23 Include the userspace header first for the definition suppression logic
24 to do the right thing.
25
26 Signed-off-by: Baruch Siach <baruch@tkos.co.il>
27 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
28 ---
29 extensions/libebt_vlan.c | 1 +
30 1 file changed, 1 insertion(+)
31
32 --- a/extensions/libebt_vlan.c
33 +++ b/extensions/libebt_vlan.c
34 @@ -12,6 +12,7 @@
35 #include <getopt.h>
36 #include <ctype.h>
37 #include <xtables.h>
38 +#include <netinet/if_ether.h>
39 #include <linux/netfilter_bridge/ebt_vlan.h>
40 #include <linux/if_ether.h>
41 #include "iptables/nft.h"