]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
ebtables: vlan: fix userspace/kernel headers collision
authorBaruch Siach <baruch@tkos.co.il>
Tue, 13 Nov 2018 17:22:08 +0000 (19:22 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 13 Nov 2018 20:12:57 +0000 (21:12 +0100)
Build with musl libc fails because of conflicting struct ethhdr
definitions:

In file included from .../sysroot/usr/include/net/ethernet.h:10:0,
                 from ../iptables/nft-bridge.h:8,
                 from libebt_vlan.c:18:
.../sysroot/usr/include/netinet/if_ether.h:107:8: error: redefinition of ‘struct ethhdr’
 struct ethhdr {
        ^~~~~~
In file included from libebt_vlan.c:16:0:
.../sysroot/usr/include/linux/if_ether.h:160:8: note: originally defined here
 struct ethhdr {
        ^~~~~~

Include the userspace header first for the definition suppression logic
to do the right thing.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libebt_vlan.c

index 4a2eb7126895eb63e12fe22e268f6b9eb1a8a20e..be269c6cdb4c82dbbd4edeffe8290a0dc6949dae 100644 (file)
@@ -12,6 +12,7 @@
 #include <getopt.h>
 #include <ctype.h>
 #include <xtables.h>
+#include <netinet/if_ether.h>
 #include <linux/netfilter_bridge/ebt_vlan.h>
 #include <linux/if_ether.h>
 #include "iptables/nft.h"