Commit c7f2cdd6 authored by KIU Shueng Chuan's avatar KIU Shueng Chuan

fix: Windows setsockopt needs char* cast

parent ca9215de
......@@ -160,10 +160,12 @@ void zmq::tune_tcp_retransmit_timeout (fd_t sockfd_, int timeout_)
#if defined (ZMQ_HAVE_WINDOWS) && defined (TCP_MAXRT)
// msdn says it's supported in >= Vista, >= Windows Server 2003
timeout_ /= 1000; // in seconds
int rc = setsockopt (sockfd_, IPPROTO_TCP, TCP_MAXRT, &timeout_, sizeof(timeout_));
int rc = setsockopt (sockfd_, IPPROTO_TCP, TCP_MAXRT, (char*) &timeout_,
sizeof(timeout_));
wsa_assert (rc != SOCKET_ERROR);
#elif defined (TCP_USER_TIMEOUT) // FIXME: should be ZMQ_HAVE_TCP_USER_TIMEOUT
int rc = setsockopt (sockfd_, IPPROTO_TCP, TCP_USER_TIMEOUT, &timeout_, sizeof(timeout_));
int rc = setsockopt (sockfd_, IPPROTO_TCP, TCP_USER_TIMEOUT, &timeout_,
sizeof(timeout_));
errno_assert (rc == 0);
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment