Yoann Vandoorselaere wrote: > > #include <sys/types.h> > #include <sys/socket.h> > + > +#ifdef HAVE_NETINET_IN_H > +# include <netinet/in.h> > +#endif > + > #ifdef HAVE_ARPA_INET_H > # include <arpa/inet.h> > #endif
Also, how about using #if instead of #ifdef, like in the rest of gnulib? *** gnulib-20060722-modified/lib/inet_ntop.h 2006-01-23 15:52:00.000000000 +0100 --- gnulib-20060703-modified/lib/inet_ntop.h 2006-06-29 00:15:15.000000000 +0200 *************** *** 17,23 **** #include <sys/types.h> #include <sys/socket.h> ! #ifdef HAVE_ARPA_INET_H # include <arpa/inet.h> #endif --- 17,23 ---- #include <sys/types.h> #include <sys/socket.h> ! #if HAVE_ARPA_INET_H # include <arpa/inet.h> #endif