fix: prefixed addrinfo

This commit is contained in:
2021-09-24 20:24:59 +02:00
parent 175adc2180
commit af413dc781

View File

@@ -32,7 +32,7 @@ bool TCPSocket::Connect(const IPAddress& address, unsigned short port) {
hints.ai_socktype = SOCK_STREAM; hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP; hints.ai_protocol = IPPROTO_TCP;
if (getaddrinfo(address.ToString().c_str(), std::to_string(port).c_str(), &hints, &result) != 0) { if (::getaddrinfo(address.ToString().c_str(), std::to_string(port).c_str(), &hints, &result) != 0) {
std::cerr << "Failed to get address info !\n"; std::cerr << "Failed to get address info !\n";
return false; return false;
} }