summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/socketengines/socketengine_select.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/socketengines/socketengine_select.cpp b/src/socketengines/socketengine_select.cpp
index b57a83ae8..b7427612e 100644
--- a/src/socketengines/socketengine_select.cpp
+++ b/src/socketengines/socketengine_select.cpp
@@ -12,7 +12,9 @@
*/
#include "inspircd.h"
+#ifndef WINDOWS
#include <sys/select.h>
+#endif // WINDOWS
#include "socketengines/socketengine_select.h"
@@ -132,7 +134,7 @@ int SelectEngine::DispatchEvents()
{
if (ev[i])
{
- if (getsockopt(ev[i]->GetFd(), SOL_SOCKET, SO_ERROR, &errcode, &codesize) < 0)
+ if (getsockopt(ev[i]->GetFd(), SOL_SOCKET, SO_ERROR, (char*)&errcode, &codesize) < 0)
errcode = errno;
ev[i]->HandleEvent(EVENT_ERROR, errcode);