Skip to contentSkip to conversation

package/ebtables: disable for musl toolchains

PATCH New Romain Naour 2 participants 2 messages Nov 11, 2015 – Nov 13, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/ebtables: disable for musl toolchains

ebtabes fail to build with a musl based toolchain due to several errors. Most of them has been fixed by [1] and [2] but it's not enought because useful_functions.c fail to build due to mixed usespace and kernel headers usage [3].

In file included from [...]/sysroot/usr/include/netinet/ether.h:8:0,
from useful_functions.c:28:
[...]/sysroot/usr/include/netinet/if_ether.h:96:8: error: redefinition of ?struct ethhdr?

 struct ethhdr {
        ^

In file included from include/linux/netfilter_bridge.h:8:0,
from include/linux/netfilter_bridge/ebtables.h:17, from include/ebtables_u.h:27,
from useful_functions.c:25:
include/linux/if_ether.h:119:8: note: originally defined here

 struct ethhdr {
        ^

Makefile:78: recipe for target 'useful_functions.o' failed

Fixes:
http://autobuild.buildroot.net/results/75c/75cc79ae2a2d05ad27198f1b745c8bef37c3a87d/build-end.log

[1] http://git.netfilter.org/ebtables/commit/?id=f8079671326e9fd079391d24911a9a8a77f1d6fd
[2] http://git.netfilter.org/ebtables/commit/?id=4488ba7aa2bb612a624c68957f464fc0ee786e05
[3] http://wiki.musl-libc.org/wiki/FAQ#Q:_why_am_i_getting_.22error:_redefinition_of_struct_ethhdr.2Ftcphdr.2Fetc.22_.3F

---
 package/ebtables/Config.in | 5 +++++
 1 file changed, 5 insertions(+)
package/ebtables/Config.in +5 -0
index 3f7566a..fa123b1 100644
@@ -1,7 +1,12 @@
 config BR2_PACKAGE_EBTABLES
 	bool "ebtables"
+	depends on !BR2_TOOLCHAIN_USES_MUSL # mixes userspace and kernel headers
 	depends on BR2_USE_MMU # fork()
 	help
 	  Ethernet bridge frame table administration
 
 	  http://ebtables.netfilter.org/
+
+comment "ebtables needs a glibc or uClibc toolchain"
+	depends on BR2_TOOLCHAIN_USES_MUSL
+	depends on BR2_USE_MMU
Signature · 1 line
2.4.3
#1 lore raw

PATCH 1/1 package/ebtables: disable for musl toolchains

Quoted 21 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

ebtabes fail to build with a musl based toolchain due to several errors. Most of them has been fixed by [1] and [2] but it's not enought because useful_functions.c fail to build due to mixed usespace and kernel headers usage [3].

In file included from [...]/sysroot/usr/include/netinet/ether.h:8:0,
from useful_functions.c:28:
[...]/sysroot/usr/include/netinet/if_ether.h:96:8: error: redefinition of ?struct ethhdr?

 struct ethhdr {
        ^

In file included from include/linux/netfilter_bridge.h:8:0,
from include/linux/netfilter_bridge/ebtables.h:17, from include/ebtables_u.h:27,
from useful_functions.c:25:
include/linux/if_ether.h:119:8: note: originally defined here

 struct ethhdr {
        ^

Makefile:78: recipe for target 'useful_functions.o' failed

Quoted 8 lines

Fixes:
http://autobuild.buildroot.net/results/75c/75cc79ae2a2d05ad27198f1b745c8bef37c3a87d/build-end.log

[1] http://git.netfilter.org/ebtables/commit/?id=f8079671326e9fd079391d24911a9a8a77f1d6fd
[2] http://git.netfilter.org/ebtables/commit/?id=4488ba7aa2bb612a624c68957f464fc0ee786e05
[3] http://wiki.musl-libc.org/wiki/FAQ#Q:_why_am_i_getting_.22error:_redefinition_of_struct_ethhdr.2Ftcphdr.2Fetc.22_.3F

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard