Bruno Haible <[EMAIL PROTECTED]> writes: > Simon Josefsson wrote: >> > The reason is that BeOS does not have PF_INET, only AF_INET, but usually >> > they >> > have the same values. Also it doesn't have PF_UNSPEC. >> >> Does it AF_UNSPEC? Did you grep the entire /usr/include tree to find >> PF_INET or PF_UNSPEC? Maybe they are in some non-standard header. > > It has neither AF_UNSPEC nor PF_UNSPEC, in no header.
Ok, thanks. >> > + #ifdef PF_UNSPEC /* BeOS lacks PF_UNSPEC. */ >> > if (family == PF_UNSPEC) >> > return true; >> > + #endif >> >> I'm not sure this will do the right thing. Usually getaddrinfo is >> called with hints structure that is zeroed out, and only the relevant >> flags asserted. If family isn't asserted, it usually means "take any >> family". > > I see. Then what about this patch? It compiles fine on BeOS. Looks good to me. Please install it. /Simon > > 2006-08-26 Bruno Haible <[EMAIL PROTECTED]> > Simon Josefsson <[EMAIL PROTECTED]> > > * getaddrinfo.c (PF_INET, PF_UNSPEC): New macros. > > *** coreutils-6.2-cvs/lib/getaddrinfo.c 2006-08-26 21:52:06.000000000 > +0200 > --- coreutils-6.2-beos/lib/getaddrinfo.c 2006-08-26 23:35:16.000000000 > +0200 > *************** > *** 42,47 **** > --- 42,56 ---- > #include "snprintf.h" > #include "strdup.h" > > + /* BeOS has AF_INET, but not PF_INET. */ > + #ifndef PF_INET > + # define PF_INET AF_INET > + #endif > + /* BeOS also lacks PF_UNSPEC. */ > + #ifndef PF_UNSPEC > + # define PF_UNSPEC 0 > + #endif > + > #if defined _WIN32 || defined __WIN32__ > # define WIN32_NATIVE > #endif _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils