diff options
author | libuv upstream <libuv@googlegroups.com> | 2017-05-25 15:51:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-05-26 17:33:40 (GMT) |
commit | 362435f02a52008a90a1c19862f09b01f1b5bd7f (patch) | |
tree | 8f63df70d3742bd44cd7a3240bc59aa1d447a08c /src/unix/bsd-ifaddrs.c | |
parent | 12a78bc824655524d817508d6107ef4dcf8e3626 (diff) | |
download | CMake-362435f02a52008a90a1c19862f09b01f1b5bd7f.zip CMake-362435f02a52008a90a1c19862f09b01f1b5bd7f.tar.gz CMake-362435f02a52008a90a1c19862f09b01f1b5bd7f.tar.bz2 |
libuv 2017-05-25 (dc596109)
Code extracted from:
https://github.com/libuv/libuv.git
at commit dc596109d5a22db1dbf57098630eebd30fce8068 (v1.x).
Diffstat (limited to 'src/unix/bsd-ifaddrs.c')
-rw-r--r-- | src/unix/bsd-ifaddrs.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/unix/bsd-ifaddrs.c b/src/unix/bsd-ifaddrs.c index 0b5653d..4147894 100644 --- a/src/unix/bsd-ifaddrs.c +++ b/src/unix/bsd-ifaddrs.c @@ -27,7 +27,9 @@ #include <ifaddrs.h> #include <net/if.h> +#if !defined(__CYGWIN__) && !defined(__MSYS__) #include <net/if_dl.h> +#endif static int uv__ifaddr_exclude(struct ifaddrs *ent) { if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING))) @@ -107,9 +109,13 @@ int uv_interface_addresses(uv_interface_address_t** addresses, int* count) { for (i = 0; i < *count; i++) { if (strcmp(address->name, ent->ifa_name) == 0) { +#if defined(__CYGWIN__) || defined(__MSYS__) + memset(address->phys_addr, 0, sizeof(address->phys_addr)); +#else struct sockaddr_dl* sa_addr; sa_addr = (struct sockaddr_dl*)(ent->ifa_addr); memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr)); +#endif } address++; } |