diff --git a/CMakeLists.txt b/CMakeLists.txt index acfc2465..0bb4b2ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -620,6 +620,7 @@ set(tests test_shutdown_stress test_timeo test_many_sockets + test_diffserv ) if(NOT WIN32) list(APPEND tests diff --git a/src/ip.cpp b/src/ip.cpp index 02781f11..52553c74 100644 --- a/src/ip.cpp +++ b/src/ip.cpp @@ -149,17 +149,13 @@ bool zmq::get_peer_ip_address (fd_t sockfd_, std::string &ip_addr_) return true; } - void zmq::set_ip_type_of_service (fd_t s_, int iptos) { - (void) s_; - - int rc = setsockopt(s_, IPPROTO_IP, IP_TOS, &iptos, sizeof(iptos)); + int rc = setsockopt(s_, IPPROTO_IP, IP_TOS, reinterpret_cast(&iptos), sizeof(iptos)); #ifdef ZMQ_HAVE_WINDOWS wsa_assert (rc != SOCKET_ERROR); #else errno_assert (rc == 0); #endif - }