Commit 2ebe6d5a025dc9762db2b1854d966639e1920e60

Aaron Dierking 2018-06-14T11:38:32

Windows support for inet_net_pton() Signed-off-by: Guillem Jover <guillem@hadrons.org>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/src/inet_net_pton.c b/src/inet_net_pton.c
index 4614248..c3d882b 100644
--- a/src/inet_net_pton.c
+++ b/src/inet_net_pton.c
@@ -19,9 +19,14 @@
 
 #include <sys/cdefs.h>
 #include <sys/types.h>
+#ifdef _WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <WinSock2.h>
+#else
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#endif
 
 #include <assert.h>
 #include <ctype.h>