diff options
author | Mike Gran <spk121@yahoo.com> | 2021-01-23 16:33:16 -0800 |
---|---|---|
committer | Michael Gran <spk121@yahoo.com> | 2021-03-10 02:01:03 -0800 |
commit | 89a299102ff3597a48febe1fb6d3097fddcda40e (patch) | |
tree | 12ec40c0e59ea712e3b1649e4212cd3f6b6b9265 | |
parent | 1b697d339b3616f4a868585b4f9ccb754b5bea57 (diff) | |
download | guile-89a299102ff3597a48febe1fb6d3097fddcda40e.tar.gz |
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
-rw-r--r-- | libguile/socket.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libguile/socket.c b/libguile/socket.c index f463ec901..9b87c0c14 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> |