diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-03-21 11:01:15 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-03-21 11:02:02 +0000 |
commit | 17769db9462e5201befcb05f86ccbaeabf35caf8 (patch) | |
tree | c6dfde6526b3745661a89dc3980cb46f8745450e /contrib/epee/src/connection_basic.cpp | |
parent | cmake: handle detecting boost using boost's own cmake files (diff) | |
download | monero-17769db9462e5201befcb05f86ccbaeabf35caf8.tar.xz |
epee: fix build with boost 1.70.0
get_io_service was deprecated, and got removed
Diffstat (limited to 'contrib/epee/src/connection_basic.cpp')
-rw-r--r-- | contrib/epee/src/connection_basic.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/contrib/epee/src/connection_basic.cpp b/contrib/epee/src/connection_basic.cpp index 83db171d8..6354082aa 100644 --- a/contrib/epee/src/connection_basic.cpp +++ b/contrib/epee/src/connection_basic.cpp @@ -47,6 +47,12 @@ // TODO: #include "net/network_throttle-detail.hpp" +#if BOOST_VERSION >= 107000 +#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context()) +#else +#define GET_IO_SERVICE(s) ((s).get_io_service()) +#endif + #undef MONERO_DEFAULT_LOG_CATEGORY #define MONERO_DEFAULT_LOG_CATEGORY "net.conn" @@ -117,8 +123,8 @@ connection_basic::connection_basic(boost::asio::ip::tcp::socket&& sock, boost::s : m_stats(std::move(stats)), mI( new connection_basic_pimpl("peer") ), - strand_(sock.get_io_service()), - socket_(sock.get_io_service(), ssl_context.context), + strand_(GET_IO_SERVICE(sock)), + socket_(GET_IO_SERVICE(sock), ssl_context.context), m_want_close_connection(false), m_was_shutdown(false), m_ssl_support(ssl_support), |