summaryrefslogtreecommitdiff
path: root/src/network/tcp_socket_handler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/tcp_socket_handler.cpp')
-rw-r--r--src/network/tcp_socket_handler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/tcp_socket_handler.cpp b/src/network/tcp_socket_handler.cpp
index 01adf04..c5d254e 100644
--- a/src/network/tcp_socket_handler.cpp
+++ b/src/network/tcp_socket_handler.cpp
@@ -139,7 +139,7 @@ void TCPSocketHandler::connect(const std::string& address, const std::string& po
this->ai_addrlen = rp->ai_addrlen;
memcpy(&this->ai_addr, rp->ai_addr, this->ai_addrlen);
memcpy(&this->addrinfo, rp, sizeof(struct addrinfo));
- this->addrinfo.ai_addr = &this->ai_addr;
+ this->addrinfo.ai_addr = reinterpret_cast<struct sockaddr*>(&this->ai_addr);
this->addrinfo.ai_next = nullptr;
// If the connection has not succeeded or failed in 5s, we consider
// it to have failed