summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-12-23 00:05:29 +0100
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-12-23 00:05:29 +0100
commitb7d8491becd281cddae94e0c7709fb7fa47133ec (patch)
tree913930e692652838a31ab481d509313e15a832db /src
parentc6ce58b302950c743bbbcbc38da4ecf33721f82b (diff)
Fixing Linux build.
Diffstat (limited to 'src')
-rw-r--r--src/Selectable.cc3
-rw-r--r--src/Socket.cc4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/Selectable.cc b/src/Selectable.cc
index 4213d34..de7d178 100644
--- a/src/Selectable.cc
+++ b/src/Selectable.cc
@@ -1,7 +1,8 @@
-#include <winsock2.h>
#include <sys/types.h>
#ifndef _MSC_VER
#include <unistd.h>
+#else
+#include <winsock2.h>
#endif
#ifdef _WIN32
#include <io.h>
diff --git a/src/Socket.cc b/src/Socket.cc
index 66dae18..e1778be 100644
--- a/src/Socket.cc
+++ b/src/Socket.cc
@@ -528,7 +528,11 @@ Balau::IO<Balau::Socket> Balau::Socket::accept() throw (GeneralException) {
} else {
Printer::elog(E_SOCKET, "Listener at %p got a new connection", this);
m_evtR->reset();
+#ifdef _MSC_VER
return IO<Socket>(new Socket(_open_osfhandle(s, 0)));
+#else
+ return IO<Socket>(new Socket(s));
+#endif
}
}
}