1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

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
This commit is contained in:
Mike Gran 2021-01-23 16:33:16 -08:00 committed by Michael Gran
parent 1b697d339b
commit 89a299102f

View file

@ -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>