Tim Rühsen wrote: > In src/hosts.c put it after > #include <string.h> > > And also remove the > # ifndef __BEOS__ > ... > part. > > I guess we should do some more cleanups there.
For sure. IMHO the best place would be in mswindows.h. (thus only 1 place). But I've so many private changes to mswindows.* that it's hard for me to create a patch. But something like: --- a/src/mswindows.h 2016-05-14 17:43:51 +++ b/src/mswindows.h 2017-03-08 10:43:33 @@ -57,6 +57,9 @@ /* Declares getpid(). */ #include <process.h> +/* Declares inet_ntop() and inet_pton(). */ +#include <arpa/inet.h> + /* We have strcasecmp and strncasecmp, just under different names. */ #ifndef HAVE_STRCASECMP # define strcasecmp stricmp @@ -85,12 +88,8 @@ #define PATH_SEPARATOR '\\' -/* Additional declarations needed for IPv6: */ -#ifdef ENABLE_IPV6 -const char *inet_ntop (int, const void *, char *, socklen_t); -#endif - -/* ioctl needed by set_windows_fd_as_blocking_socket() */ +/* We need to include this header since Gnulib's unlink() could be defined as + rpl_unlink(). And because 'struct options' has no 'rpl_unlink' member. */ #include <sys/ioctl.h> /* Public functions. */ ---- (also explains why <sys/ioctl.h> is needed). -- --gv