0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-01 02:27:49 +08:00

Merge pull request #2013 from aseering/master

Windows Subsystem for Linux compatibility fix
This commit is contained in:
Doron Somech 2016-05-27 10:36:14 +03:00
commit 184840cf37

View File

@ -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);