Fix macOS build failure

Issue #2976.
This commit is contained in:
Eelco Dolstra 2019-06-28 15:38:23 +02:00
parent 324a5dc92f
commit 6847c92788
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -39,8 +39,8 @@ static bool haveInternet()
return true;
}
} else if (i->ifa_addr->sa_family == AF_INET6) {
if (!IN6_IS_ADDR_LOOPBACK(((sockaddr_in6 *) i->ifa_addr)->sin6_addr.s6_addr) &&
!IN6_IS_ADDR_LINKLOCAL(((sockaddr_in6 *) i->ifa_addr)->sin6_addr.s6_addr))
if (!IN6_IS_ADDR_LOOPBACK(&((sockaddr_in6 *) i->ifa_addr)->sin6_addr) &&
!IN6_IS_ADDR_LINKLOCAL(&((sockaddr_in6 *) i->ifa_addr)->sin6_addr))
return true;
}
}