diff --git a/include/libtorrent/error_code.hpp b/include/libtorrent/error_code.hpp index 1862e18e2..f88983b28 100644 --- a/include/libtorrent/error_code.hpp +++ b/include/libtorrent/error_code.hpp @@ -46,6 +46,7 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include +#include #include "libtorrent/aux_/disable_warnings_pop.hpp" diff --git a/test/test_tracker.cpp b/test/test_tracker.cpp index 403177be6..4c65590d4 100644 --- a/test/test_tracker.cpp +++ b/test/test_tracker.cpp @@ -465,13 +465,14 @@ TORRENT_TEST(try_next) if (tr[0].fails == 1) { TEST_EQUAL(tr[0].verified, false); - TEST_EQUAL(tr[0].last_error, boost::asio::error::netdb_errors::host_not_found); + TEST_EQUAL(tr[0].last_error + , error_code(boost::asio::error::host_not_found)); } TEST_EQUAL(tr[1].fails, 1); TEST_EQUAL(tr[1].verified, false); TEST_CHECK(tr[1].last_error == boost::asio::error::timed_out - || tr[1].last_error == boost::asio::error::connection_refused); + || tr[1].last_error == boost::system::error_condition(boost::system::errc::connection_refused)); TEST_EQUAL(tr[2].fails, 0); TEST_EQUAL(tr[2].verified, true);