[BusyBox] Include netinet/in.h in libbb.h [PATCH]

Rob Landley rob at landley.net
Mon Jul 25 08:09:15 UTC 2005


On Monday 25 July 2005 00:35, Shaun Jackman wrote:
> On 4/6/05, Shaun Jackman <sjackman at gmail.com> wrote:
> > On Apr 5, 2005 9:46 PM, Rob Landley <rob at landley.net> wrote:
> > > On Tuesday 05 April 2005 01:56 pm, Shaun Jackman wrote:
> > > > libbb.h uses struct sockaddr_in which is defined in netinet/in.h, so
> > > > include it.
> > >
> > > Um, what does this fix?  (I'm fairly certain this already compiles...)
> >
> > libbb.h uses struct sockaddr_in the declaration of two functions,
> > xconnect and bb_lookup_host, but it does not declare the structure.
>
> Since libbb.h uses struct sockaddr_in, it must include netinet/in.h.
>
> In glibc, netdb.h includes netinet/in.h, but this is a side effect
> unique to the GNU libc implementation and not a requirement of
> netdb.h.
>
> This patch is necessary to allow busybox to compile on other standard
> implementations of libc that do not exhibit this unique behaviour

A) it's not "unique"; uclibc does it too.

B) how do you use netdb.h without in.h?  (What, x.25?)

But applied anyway...

Rob



More information about the busybox mailing list