workaround an old asio bug on 64 bit machines

This commit is contained in:
Arvid Norberg 2011-11-13 09:25:50 +00:00
parent 5576a98d04
commit 51c32fefbc
1 changed files with 4 additions and 0 deletions

View File

@ -106,7 +106,11 @@ namespace libtorrent
address_v4 broadcast_address() const
{
error_code ec;
#if BOOST_VERSION < 104700
return address_v4(socket->local_endpoint(ec).address().to_v4().to_ulong() | ((~netmask.to_ulong()) & 0xffffffff));
#else
return address_v4::broadcast(socket->local_endpoint(ec).address().to_v4(), netmask);
#endif
}
};