diff --git a/network_win32.cpp b/network_win32.cpp index d364611..5a45ce5 100644 --- a/network_win32.cpp +++ b/network_win32.cpp @@ -987,7 +987,7 @@ DWORD SetMetricOnNetworkAdapter(NET_LUID *InterfaceLuid, ADDRESS_FAMILY family, static const char *PrintIPV6(const uint8 new_address[16]) { sockaddr_in6 sin6 = {0}; static char buf[100]; - if (!inet_ntop(PF_INET6, new_address, buf, 100)) + if (!inet_ntop(PF_INET6, (void*)new_address, buf, 100)) memcpy(buf, "unknown", 8); return buf; } diff --git a/wireguard_config.cpp b/wireguard_config.cpp index dbc67b0..974f768 100644 --- a/wireguard_config.cpp +++ b/wireguard_config.cpp @@ -25,7 +25,8 @@ #endif const char *print_ip_prefix(char buf[kSizeOfAddress], int family, const void *ip, int prefixlen) { - if (!inet_ntop(family, ip, buf, kSizeOfAddress - 8)) { + // cast to void* to work on VS2015 + if (!inet_ntop(family, (void*)ip, buf, kSizeOfAddress - 8)) { memcpy(buf, "unknown", 8); } if (prefixlen >= 0)