mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-10 16:06:09 +00:00
fix: sockets are not signed int on Windows
This commit is contained in:
parent
f88d129b50
commit
bb4bcf8f45
@ -271,7 +271,7 @@ int zmq::tcp_connecter_t::open ()
|
|||||||
s = open_socket (tcp_addr->family (), SOCK_STREAM, IPPROTO_TCP);
|
s = open_socket (tcp_addr->family (), SOCK_STREAM, IPPROTO_TCP);
|
||||||
|
|
||||||
// IPv6 address family not supported, try automatic downgrade to IPv4.
|
// IPv6 address family not supported, try automatic downgrade to IPv4.
|
||||||
if (s == -1 && tcp_addr->family () == AF_INET6
|
if (s == zmq::retired_fd && tcp_addr->family () == AF_INET6
|
||||||
&& errno == EAFNOSUPPORT
|
&& errno == EAFNOSUPPORT
|
||||||
&& options.ipv6) {
|
&& options.ipv6) {
|
||||||
rc = addr->resolved.tcp_addr->resolve (
|
rc = addr->resolved.tcp_addr->resolve (
|
||||||
|
@ -178,7 +178,7 @@ int zmq::tcp_listener_t::set_address (const char *addr_)
|
|||||||
s = open_socket (address.family (), SOCK_STREAM, IPPROTO_TCP);
|
s = open_socket (address.family (), SOCK_STREAM, IPPROTO_TCP);
|
||||||
|
|
||||||
// IPv6 address family not supported, try automatic downgrade to IPv4.
|
// IPv6 address family not supported, try automatic downgrade to IPv4.
|
||||||
if (s == -1 && address.family () == AF_INET6
|
if (s == zmq::retired_fd && address.family () == AF_INET6
|
||||||
&& errno == EAFNOSUPPORT
|
&& errno == EAFNOSUPPORT
|
||||||
&& options.ipv6) {
|
&& options.ipv6) {
|
||||||
rc = address.resolve (addr_, true, false);
|
rc = address.resolve (addr_, true, false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user