[PATCH 4/5] Gate including net/ethernet.h on HAVE_NET_ETHERNET_H

Dan Fandrich dan at coneharvesters.com
Thu Jun 2 06:17:16 UTC 2011


On Wed, Jun 01, 2011 at 07:27:40PM -0400, Rich Felker wrote:
> This is nonsense. glibc older than 2.1 is definitely not usable.

I didn't want to break anything with this patch. Now that the glibc
check is done in only one place, it's pretty harmless to keep around.

> I suspect this might break support for anything that lacks
> netpacket/packet.h, including musl. In general it's a very bad idea to
> use the same HAVE_* macro for two completely separate headers.

In general, yes, but net/ethernet.h & netpacket/packet.h seem to go hand
in hand in many places in Busybox. The presence or absence of
net/ethernet.h is taken as a signal to use one of two methods of getting
the correct Ethernet definitions. It could be made more complicated with
many more HAVE_ macros, but I'll leave it to someone who has a need for that
to make that change.

>>> Dan


More information about the busybox mailing list