Commit cd52796f authored by Joseph Noir's avatar Joseph Noir

Fix Windows build

parent d5e7cd0d
...@@ -94,7 +94,7 @@ void for_each_adapter(F f, bool is_link_local = false) { ...@@ -94,7 +94,7 @@ void for_each_adapter(F f, bool is_link_local = false) {
return; return;
} }
auto adapters = adapters_ptr{reinterpret_cast<IP_ADAPTER_ADDRESSES*>( auto adapters = adapters_ptr{reinterpret_cast<IP_ADAPTER_ADDRESSES*>(
::malloc(len), ::malloc(len)),
free}; free};
if (!adapters) { if (!adapters) {
CAF_LOG_ERROR("malloc failed"); CAF_LOG_ERROR("malloc failed");
...@@ -123,7 +123,7 @@ void for_each_adapter(F f, bool is_link_local = false) { ...@@ -123,7 +123,7 @@ void for_each_adapter(F f, bool is_link_local = false) {
getnameinfo(addr->Address.lpSockaddr, addr->Address.iSockaddrLength, getnameinfo(addr->Address.lpSockaddr, addr->Address.iSockaddrLength,
ip_buf, sizeof(ip_buf), nullptr, 0, NI_NUMERICHOST); ip_buf, sizeof(ip_buf), nullptr, 0, NI_NUMERICHOST);
ip_address ip; ip_address ip;
if (!is_link_local && starts_with(if_buf, "fe80:")) { if (!is_link_local && starts_with(ip_buf, "fe80:")) {
CAF_LOG_DEBUG("skipping link-local address: " << ip_buf); CAF_LOG_DEBUG("skipping link-local address: " << ip_buf);
continue; continue;
} else if (auto err = parse(ip_buf, ip)) } else if (auto err = parse(ip_buf, ip))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment