Fixed various type inconsistencies to remove warning when building on Windows

This commit is contained in:
Jason Watkins
2015-04-14 15:49:25 -07:00
parent 118af68620
commit 8591db96c0
9 changed files with 65 additions and 44 deletions

View File

@@ -141,7 +141,8 @@ namespace XPC
{
remoteHost = "127.0.0.1";
}
std::uint32_t ip = inet_addr(remoteHost.c_str());
std::uint32_t ip;
inet_pton(AF_INET, remoteHost.c_str(), &ip);
SendTo(buffer, len, ip, remotePort);
}
@@ -160,7 +161,7 @@ namespace XPC
setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &on, sizeof(on));
buffer[4] = (std::uint8_t)len;
if (sendto(sock, (char*)buffer, len, 0, (const struct sockaddr *) &remoteAddr, sizeof(remoteAddr)) < 0)
if (sendto(sock, (char*)buffer, (int)len, 0, (const struct sockaddr *) &remoteAddr, sizeof(remoteAddr)) < 0)
{
#if LOG_VERBOSITY > 0
Log::FormatLine("[SOCK] Send failed. (remote: %s:%d)", remoteAddr, remotePort);