Re: un.h (2.2.5) breaks bind 8.2 compile?

Alexander Viro (viro@math.psu.edu)
Sun, 4 Apr 1999 00:00:43 -0500 (EST)


On Sat, 3 Apr 1999, R Dicaire wrote:

> On Sat, 3 Apr 1999, Richard B. Johnson wrote:
>
> > On Sat, 3 Apr 1999, R Dicaire wrote:
> >
> > > Seems bind 8.2 compile is choking on sa_family_t in
> > > /usr/src/linux/include/linux/un.h:
> >
> > named/bind-8.1.1 and all its tools like addr, dig, dnsquery, host,
> > name-xfer, ndc, nslookup, and nsupdate all compile fine on my system.
>
> Yes, and bind 8.1.2 compiled fine on my systems as well, I just wonder
> why the change in 2.2.5's un.h from 2.0.36's, the latters version of un.h
> which I used to compile bind 8.2.
>
> I also wonder why Red Hat machines appear to compile ths fine but the two
> Slackware 3.6 boxes I have wouldn't (one 2.2.4, other 2.2.5).
>
> Curious...

Really, curious... The first search for bind & un.h & linux-kernel on
Dejanews would show the previous thread on the topic.

Answer: with many versions of libc (4.3BSD libc and Linux libc5 included)
one needs to include sys/socket.h before sys/un.h. So any program that
pretends to be portable shouldn't include sys/un.h alone. bind does it (in
one of the auxillary programs). glibc masks this bug, but it's bug anyway
- bind *is* intended to be portable. The rest is left as an exercise for
reader.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/