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

Fixed Windows build

This commit is contained in:
Adam
2010-10-11 18:47:54 -04:00
parent 717c123441
commit d7aa5f6a3a
13 changed files with 34 additions and 27 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ DNSManager *DNSEngine = NULL;
static inline unsigned short GetRandomID()
{
return random();
return rand();
}
DNSRequest::DNSRequest(const Anope::string &addr, QueryType qt, bool cache, Module *c) : creator(c), address(addr), QT(qt)
@@ -226,7 +226,7 @@ DNSSocket::~DNSSocket()
int DNSSocket::SendTo(const unsigned char *buf, size_t len) const
{
return sendto(this->GetFD(), buf, len, 0, &this->conaddr.sa, this->conaddr.size());
return sendto(this->GetFD(), reinterpret_cast<const char *>(buf), len, 0, &this->conaddr.sa, this->conaddr.size());
}
int DNSSocket::RecvFrom(char *buf, size_t len, sockaddrs &addrs) const
@@ -443,7 +443,7 @@ bool DNSSocket::ProcessRead()
}
default:
delete rr;
request->OnError(DNS_ERROR_INVALID_TYPE, "Invalid query type");
request->OnError(DNS_ERROR_INVALIDTYPE, "Invalid query type");
rr = NULL;
}