[Buildroot] ebtables and musl

Markus Mayer mmayer at broadcom.com
Fri Jun 12 20:10:28 UTC 2020

Hi all,

I see this patch in Buildroot:

However, I am still running into the issue it is supposed to fix.

This is with musl-1.2.0, the latest and greatest. I'm no longer stuck
with the ancient libmusl that caused issues with procps. It doesn't
seem to help with ebtables, though.

  -fPIC -O3 -DPROGVERSION=\"2.0.10-4\" -DPROGNAME=\"ebtables\"
-DPROGDATE=\"December\ 2011\" -D_PATH_ETHERTYPES=\"/etc/ethertypes\"
-DLOCKFILE=\"/var/lib/ebtables/lock\" -DLOCKDIR=\"/var/lib/ebtables/\"
-c -o extensions/ebt_802_3.o extensions/ebt_802_3.c -Iinclude/
In file included from include/linux/netfilter_bridge.h:8:0,
                 from include/linux/netfilter_bridge/ebtables.h:17,
                 from include/ebtables_u.h:28,
                 from useful_functions.c:25:
include/linux/if_ether.h:119:8: error: redefinition of 'struct ethhdr'
 struct ethhdr {
In file included from
                 from include/ebtables_u.h:27,
                 from useful_functions.c:25:
note: originally defined here
 struct ethhdr {
Makefile:78: recipe for target 'useful_functions.o' failed
make[2]: *** [useful_functions.o] Error 1
make[2]: *** Waiting for unfinished jobs....

I am not quite sure what to make of it yet.

Is it cause by the fact that include/linux/if_ether.h defines


but include/netinet/if_ether.h defines


and they both end up being included?

$ find . -name if_ether.h -ls
  6025818      4 -rw-r--r--   1 mmayer   mmayer       1506 May 26
16:30 ./build/linux-custom/include/linux/if_ether.h
  6028683      8 -rw-r--r--   1 mmayer   mmayer       7461 May 26
16:30 ./build/linux-custom/include/uapi/linux/if_ether.h
  6047054      8 -rw-r--r--   1 mmayer   mmayer       5751 Dec 15
2011 ./build/ebtables-2.0.10-4/include/linux/if_ether.h
  5934557      8 -rw-r--r--   1 mmayer   mmayer       7016 Jun 10
16:52 ./host/aarch64-buildroot-linux-musl/sysroot/usr/include/linux/if_ether.h
  5935035      4 -rw-r--r--   1 mmayer   mmayer       3625 Jun 10
16:52 ./host/aarch64-buildroot-linux-musl/sysroot/usr/include/netinet/if_ether.h

Also, there's five different copies of if_ether.h floating around.

While we are on the topic of ebtables, why is buildroot still using
v2.0.10-4 from 2014 when there is 2.0.11 from 2019 (as per
http://ftp.netfilter.org/pub/ebtables/)? Is it just a matter of
submitting a patch to update it or is there an underlying reason to
keep the old version around?


More information about the buildroot mailing list