diff options
author | Adam <Adam@anope.org> | 2014-02-21 21:48:44 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-02-21 21:54:01 -0500 |
commit | aa6b12c5eb805f8e6478f799aa7801ef2b0fa9eb (patch) | |
tree | 5693f4abb249091caf881b217330f35e67465407 | |
parent | e2bd08fbff7182042658aae49189fcc458746649 (diff) |
Fix Windows build
-rw-r--r-- | src/sockets.cpp | 4 | ||||
-rw-r--r-- | src/win32/anope_windows.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/sockets.cpp b/src/sockets.cpp index f50092744..f047c5f44 100644 --- a/src/sockets.cpp +++ b/src/sockets.cpp @@ -517,8 +517,8 @@ ListenSocket::ListenSocket(const Anope::string &bindip, int port, bool i) { this->SetBlocking(false); - int op = 1; - setsockopt(this->GetFD(), SOL_SOCKET, SO_REUSEADDR, &op, sizeof(op)); + const int op = 1; + setsockopt(this->GetFD(), SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<const char *>(&op), sizeof(op)); this->bindaddr.pton(i ? AF_INET6 : AF_INET, bindip, port); this->io->Bind(this, bindip, port); diff --git a/src/win32/anope_windows.h b/src/win32/anope_windows.h index d2077b1c9..ad561f9b3 100644 --- a/src/win32/anope_windows.h +++ b/src/win32/anope_windows.h @@ -59,6 +59,8 @@ #include "pthread/pthread.h" #include "sigaction/sigaction.h" +typedef int ssize_t; + namespace Anope { class string; |