diff --git a/src/disk_io_thread.cpp b/src/disk_io_thread.cpp index af8192ffd..873add80a 100644 --- a/src/disk_io_thread.cpp +++ b/src/disk_io_thread.cpp @@ -1450,7 +1450,10 @@ namespace libtorrent if (j.buffer == 0) { ret = -1; -#if BOOST_VERSION >= 103500 +#if BOOST_VERSION == 103500 + j.error = error_code(boost::system::posix_error::not_enough_memory + , get_posix_category()); +#elif BOOST_VERSION > 103500 j.error = error_code(boost::system::errc::not_enough_memory , get_posix_category()); #else @@ -1510,7 +1513,10 @@ namespace libtorrent if (j.buffer == 0) { ret = -1; -#if BOOST_VERSION >= 103500 +#if BOOST_VERSION == 103500 + j.error = error_code(boost::system::posix_error::not_enough_memory + , get_posix_category()); +#elif BOOST_VERSION > 103500 j.error = error_code(boost::system::errc::not_enough_memory , get_posix_category()); #else diff --git a/src/torrent.cpp b/src/torrent.cpp index ee2a58552..e49a16efd 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -395,7 +395,9 @@ namespace libtorrent } if (j.error == -#if BOOST_VERSION >= 103500 +#if BOOST_VERSION == 103500 + error_code(boost::system::posix_error::not_enough_memory, get_posix_category()) +#elif BOOST_VERSION > 103500 error_code(boost::system::errc::not_enough_memory, get_posix_category()) #else asio::error::no_memory