summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2011-08-17 18:58:39 +0100
committerNick White <git@njw.me.uk>2011-08-17 18:58:39 +0100
commitadc5f128fcf3cb75b9130a7cc36e3681b1817284 (patch)
tree22605e233ab98bdb5c6b5ce144d4677ecc0480b3 /util.c
parente6037966d0fc676b78bce9a4dd0b7776ab9f4a7b (diff)
Allow mingw building (socket reading won't work yet)
Diffstat (limited to 'util.c')
-rw-r--r--util.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/util.c b/util.c
index 6e341a5..1d7f9d0 100644
--- a/util.c
+++ b/util.c
@@ -3,10 +3,15 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#include "util.h"
+#ifndef WINVER
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
-#include "util.h"
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
/* plundered from suckless' sic */
int dial(char *host, char *port) {