From aa6b12c5eb805f8e6478f799aa7801ef2b0fa9eb Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 21 Feb 2014 21:48:44 -0500 Subject: [PATCH] Fix Windows build --- src/sockets.cpp | 4 ++-- 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(&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;