#include "IOTimer.h"
#ifdef WIN32
-
+#ifdef _WIN32_WINNT
+#undef _WIN32_WINNT
+#endif
#define _WIN32_WINNT 0x501
-#include <windows.h>
#include <winsock2.h>
+#include <windows.h>
/* This is massively kludgy. Unfortunately, the only performant I/O
* multiplexer with halfway decent semantics under Windows is
if(iosock->socket_flags & IOSOCKETFLAG_CONNECTING)
return FD_CONNECT;
- return FD_READ | FD_CLOSE | (iosocket_wants_writes(iosock) ? FD_WRITE : 0);
+ return FD_CLOSE | (iosocket_wants_reads(iosock) ? FD_READ : 0) | (iosocket_wants_writes(iosock) ? FD_WRITE : 0);
}
static void engine_win32_update(struct _IOSocket *iosock) {