mike121 pushed a commit to branch master in repository guile. commit 89a299102ff3597a48febe1fb6d3097fddcda40e Author: Mike Gran <spk...@yahoo.com> AuthorDate: Sat Jan 23 16:33:16 2021 -0800
On Win32, prefer winsock2 header for socket declarations * libguile/posix-w32.h: prefer lowercase windows.h for MinGW cross-builds * libguile/socket.c [HAVE_WINSOCK2_H]: use only winsock2.h for socket declarations --- libguile/socket.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libguile/socket.c b/libguile/socket.c index f463ec9..9b87c0c 100644 --- a/libguile/socket.c +++ b/libguile/socket.c @@ -34,13 +34,18 @@ #include <string.h> #endif #include <unistd.h> -#include <sys/socket.h> #include <sys/types.h> + +#ifdef HAVE_WINSOCK2_H +#include <winsock2.h> +#else /* ! HAVE_WINSOCK2_H */ +#include <sys/socket.h> +#include <netinet/in.h> +#include <netinet/tcp.h> #ifdef HAVE_UNIX_DOMAIN_SOCKETS #include <sys/un.h> #endif -#include <netinet/in.h> -#include <netinet/tcp.h> +#endif /* ! HAVE_WINSOCK2_H */ #include <netdb.h> #include <arpa/inet.h>