summaryrefslogtreecommitdiff
path: root/libguile
diff options
context:
space:
mode:
Diffstat (limited to 'libguile')
-rw-r--r--libguile/socket.c11
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>