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

Denys Vlasenko vda.linux at googlemail.com
Sun Jun 12 15:16:30 UTC 2011


On Friday 10 June 2011 07:17, Dan Fandrich wrote:
> On Thu, Jun 09, 2011 at 09:58:47PM -0700, Dan Fandrich wrote:
> > On Fri, Jun 10, 2011 at 05:18:39AM +0200, Denys Vlasenko wrote:
> > > On Friday 10 June 2011 01:00, Dan Fandrich wrote:
> > > -#include <net/if.h>
> > > -#include <net/if_packet.h>
> > > -#include <netpacket/packet.h>
> > > -#include <net/ethernet.h>
> > > -
> > >  #include "ip_common.h"  /* #include "libbb.h" is inside */
> > >  #include "rt_names.h"
> > >  #include "utils.h"
> > >  
> > > +#include <net/if.h>
> > > +#include <net/if_packet.h>
> > > +#include <netpacket/packet.h>
> > > +#include <netinet/if_ether.h>
> > > 
> > > 
> > > If it is needed, then you need to add a comment why.
> > 
> > At one point I had an #ifdef HAVE_NET_ETHERNET_H in there, which meant that
> > #include "ip_common.h" had to be included first. I just left it in for
> > consistency with the others--there should be no problem leaving it out.
> 
> Looks like I spoke too soon...I thought this was just reordering the header
> files, but I didn't spot that the last header file is actually changed as
> well. The order works either way, but that last one needs to change to
> work on Android, at least.

I did the following:

-#include <net/ethernet.h>
+#include <netinet/if_ether.h>

Please try current git.

-- 
vda


More information about the busybox mailing list