Simon Josefsson <[EMAIL PROTECTED]> writes: > Jim Meyering <[EMAIL PROTECTED]> writes: > >> Simon Josefsson <[EMAIL PROTECTED]> wrote: >>> Yes, I'll work on this. >>> >>> How about this patch? Not exactly like you suggested, but appears >>> good to me. I have not tested this, but if it looks good for you, >>> I'll install it in my projects and rebuild them, then we can sort out >>> any remaining build problems later on. >> >> Thanks. >> I've checked that in to coreutils and will test it, too. > > I installed it in gnulib and will test the combination too. > >> I've also just checked the following in to gnulib: > > Thanks!
Testing resulted in the patch below, now installed. The module appears to work on multiple platforms. 2005-10-01 Simon Josefsson <[EMAIL PROTECTED]> * getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD and Darwin. --- getaddrinfo.m4 01 Oct 2005 12:24:49 +0200 1.9 +++ getaddrinfo.m4 01 Oct 2005 13:18:03 +0200 @@ -21,6 +21,12 @@ AC_REQUIRE([AC_GNU_SOURCE]) AC_CHECK_HEADERS_ONCE(sys/socket.h netdb.h sys/types.h netinet/in.h) AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, gai_strerror],,,[ + /* sys/types.h is not needed according to POSIX, but the + sys/socket.h in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif #ifdef HAVE_SYS_SOCKET_H # include <sys/socket.h> #endif @@ -29,6 +35,9 @@ #endif ]) AC_CHECK_TYPES([struct addrinfo],,,[ +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif #ifdef HAVE_SYS_SOCKET_H # include <sys/socket.h> #endif _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib