Skip to content

Commit

Permalink
On systems where getifaddrs() exists but isn't implemented, behave as…
Browse files Browse the repository at this point in the history
… if 'resolve_nic_name()' were entirely unsupported
  • Loading branch information
aseering committed May 27, 2016
1 parent 9a50364 commit b1e2b87
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/tcp_address.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ int zmq::tcp_address_t::resolve_nic_name (const char *nic_, bool ipv6_, bool is_
// Get the addresses.
ifaddrs *ifa = NULL;
const int rc = getifaddrs (&ifa);
if (rc != 0 && errno == EINVAL) {
// Windows Subsystem for Linux compatibility
LIBZMQ_UNUSED (nic_);
LIBZMQ_UNUSED (ipv6_);

errno = ENODEV;
return -1;
}
errno_assert (rc == 0);
zmq_assert (ifa != NULL);

Expand Down

0 comments on commit b1e2b87

Please sign in to comment.