aboutsummaryrefslogtreecommitdiff
path: root/win32port
diff options
context:
space:
mode:
authorAndy Green <andy@warmcat.com>2012-04-12 13:26:49 +0800
committerAndy Green <andy.green@linaro.org>2012-04-12 13:32:19 +0800
commitaa6fc44b0aba44a4ce455bb5752c3bacc20c4991 (patch)
treeb3a396458c6f63b8e3c56584bc794c4ec24e19cd /win32port
parentdc36192435059246cfb5bc492761c60a663d9ae6 (diff)
downloadlibwebsockets-aa6fc44b0aba44a4ce455bb5752c3bacc20c4991.tar.gz
mingw add win32helper to lib and fix extpoll
Based on work from Radu Sorici <soriciradu@gmail.com> Signed-off-by: Andy Green <andy.green@linaro.org>
Diffstat (limited to 'win32port')
-rw-r--r--win32port/win32helpers/websock-w32.c9
-rw-r--r--win32port/win32helpers/websock-w32.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/win32port/win32helpers/websock-w32.c b/win32port/win32helpers/websock-w32.c
index d412c0c9..bec150b1 100644
--- a/win32port/win32helpers/websock-w32.c
+++ b/win32port/win32helpers/websock-w32.c
@@ -1,6 +1,15 @@
#define FD_SETSIZE 256
+#ifdef __MINGW32__
+#include <winsock2.h>
+#else
+#ifdef __MINGW64__
+#include <winsock2.h>
+#else
#include <WinSock2.h>
+#endif
+#endif
+
#include <stdlib.h>
#include <errno.h>
#include "websock-w32.h"
diff --git a/win32port/win32helpers/websock-w32.h b/win32port/win32helpers/websock-w32.h
index 2483a8ff..dfd99ca9 100644
--- a/win32port/win32helpers/websock-w32.h
+++ b/win32port/win32helpers/websock-w32.h
@@ -28,6 +28,8 @@
#ifdef DEF_POLL_STUFF
+#include <winsock2.h>
+
typedef struct pollfd {
SOCKET fd;
short events;