1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 17:06:37 +02:00

Fixed windows build

This commit is contained in:
Adam
2011-08-10 01:32:07 -04:00
parent 13bcc4ef14
commit ded98ed3de
11 changed files with 37 additions and 17 deletions
+3 -3
View File
@@ -666,7 +666,7 @@ bool ConnectionSocket::ProcessRead()
{
int optval = 0;
socklen_t optlen = sizeof(optval);
if (!getsockopt(this->GetFD(), SOL_SOCKET, SO_ERROR, &optval, &optlen) && !optval)
if (!getsockopt(this->GetFD(), SOL_SOCKET, SO_ERROR, reinterpret_cast<char *>(&optval), &optlen) && !optval)
{
this->connected = true;
this->OnConnect();
@@ -694,7 +694,7 @@ bool ConnectionSocket::ProcessWrite()
{
int optval = 0;
socklen_t optlen = sizeof(optval);
if (!getsockopt(this->GetFD(), SOL_SOCKET, SO_ERROR, &optval, &optlen) && !optval)
if (!getsockopt(this->GetFD(), SOL_SOCKET, SO_ERROR, reinterpret_cast<char *>(&optval), &optlen) && !optval)
{
this->connected = true;
this->OnConnect();
@@ -720,7 +720,7 @@ void ConnectionSocket::ProcessError()
{
int optval = 0;
socklen_t optlen = sizeof(optval);
getsockopt(this->GetFD(), SOL_SOCKET, SO_ERROR, &optval, &optlen);
getsockopt(this->GetFD(), SOL_SOCKET, SO_ERROR, reinterpret_cast<char *>(&optval), &optlen);
errno = optval;
this->OnError(optval ? Anope::LastError() : "");
}