p2p: make this work with boost <= 1.65 (pffff)

This commit is contained in:
moneromooo-monero 2020-11-04 23:01:23 +00:00 committed by wowario
parent 0f998b9b55
commit c40d8f5672
No known key found for this signature in database
GPG key ID: 24DCBE762DE9C111

View file

@ -1497,7 +1497,11 @@ namespace nodetool
if (actual_ip.is_v4_mapped())
{
boost::asio::ip::address_v4 v4ip = make_address_v4_from_v6(actual_ip);
#if BOOST_VERSION >= 106600
return epee::net_utils::ipv4_network_address(v4ip.to_uint(), 0).host_str();
#else
return epee::net_utils::ipv4_network_address(v4ip.to_ulong(), 0).host_str();
#endif
}
}
return address.host_str();