--- libtorrent-rasterbar-1.1.11/include/libtorrent/io_service_fwd.hpp.orig 2018-11-18 13:55:50.000000000 +0100 +++ libtorrent-rasterbar-1.1.11/include/libtorrent/io_service_fwd.hpp 2019-04-28 16:31:24.497229017 +0200 @@ -69,6 +69,15 @@ #else typedef boost::asio::io_service io_service; #endif + +#if BOOST_VERSION >= 107000 +template +io_service& get_io_service(T& o) { return static_cast(o.get_executor().context()); } +#else +template +io_service& get_io_service(T& o) { return o.get_io_service(); } +#endif + } #endif --- libtorrent-rasterbar-1.1.11/include/libtorrent/io_service.hpp.orig 2019-04-28 16:35:33.779211874 +0200 +++ libtorrent-rasterbar-1.1.11/include/libtorrent/io_service.hpp 2019-04-28 16:35:38.492519673 +0200 @@ -58,14 +58,7 @@ #undef Protocol #endif -namespace libtorrent -{ -#if defined TORRENT_BUILD_SIMULATOR - typedef sim::asio::io_service io_service; -#else - typedef boost::asio::io_service io_service; -#endif -} +#include "libtorrent/io_service_fwd.hpp" #endif --- libtorrent-rasterbar-1.0.11/include/libtorrent/tracker_manager.hpp.orig 2017-02-04 19:16:33.000000000 +0100 +++ libtorrent-rasterbar-1.0.11/include/libtorrent/tracker_manager.hpp 2019-04-27 18:54:42.557868860 +0200 @@ -191,7 +191,7 @@ virtual void on_timeout(error_code const& ec) = 0; virtual ~timeout_handler() {} - io_service& get_io_service() { return m_timeout.get_io_service(); } + io_service& get_io_service() { return libtorrent::get_io_service(m_timeout); } private: --- libtorrent-rasterbar-1.1.11/include/libtorrent/proxy_base.hpp.orig 2017-02-04 19:16:33.000000000 +0100 +++ libtorrent-rasterbar-1.1.11/include/libtorrent/proxy_base.hpp 2019-04-27 21:18:33.689487409 +0200 @@ -250,7 +250,7 @@ io_service& get_io_service() { - return m_sock.get_io_service(); + return libtorrent::get_io_service(m_sock); } lowest_layer_type& lowest_layer() --- libtorrent-rasterbar-1.1.11/include/libtorrent/udp_socket.hpp.orig 2019-04-28 17:14:01.486709949 +0200 +++ libtorrent-rasterbar-1.1.11/include/libtorrent/udp_socket.hpp 2019-04-28 17:34:30.006721152 +0200 @@ -80,7 +80,7 @@ }; bool is_open() const { return m_abort == false; } - io_service& get_io_service() { return m_ipv4_sock.get_io_service(); } + io_service& get_io_service() { return libtorrent::get_io_service(m_ipv4_sock); } void subscribe(udp_socket_observer* o); void unsubscribe(udp_socket_observer* o); --- libtorrent-rasterbar-1.1.11/src/http_connection.cpp.orig 2019-04-28 17:34:49.723281005 +0200 +++ libtorrent-rasterbar-1.1.11/src/http_connection.cpp 2019-04-28 19:21:25.738630816 +0200 @@ -150,7 +150,7 @@ if (ec) { - m_timer.get_io_service().post(boost::bind(&http_connection::callback + libtorrent::get_io_service(m_timer).post(boost::bind(&http_connection::callback , me, ec, static_cast(NULL), 0)); return; } @@ -162,7 +162,7 @@ ) { error_code err(errors::unsupported_url_protocol); - m_timer.get_io_service().post(boost::bind(&http_connection::callback + libtorrent::get_io_service(m_timer).post(boost::bind(&http_connection::callback , me, err, static_cast(NULL), 0)); return; } @@ -263,7 +263,7 @@ if (ec) { - m_timer.get_io_service().post(boost::bind(&http_connection::callback + libtorrent::get_io_service(m_timer).post(boost::bind(&http_connection::callback , me, ec, static_cast(NULL), 0)); return; } @@ -303,7 +303,7 @@ if (i2p_conn->proxy().type != settings_pack::i2p_proxy) { - m_timer.get_io_service().post(boost::bind(&http_connection::callback + libtorrent::get_io_service(m_timer).post(boost::bind(&http_connection::callback , me, error_code(errors::no_i2p_router), static_cast(NULL), 0)); return; } @@ -337,7 +337,7 @@ m_ssl_ctx->set_verify_mode(ssl::context::verify_none, ec); if (ec) { - m_timer.get_io_service().post(boost::bind(&http_connection::callback + libtorrent::get_io_service(m_timer).post(boost::bind(&http_connection::callback , me, ec, static_cast(NULL), 0)); return; } @@ -349,7 +349,7 @@ // assume this is not a tracker connection. Tracker connections that // shouldn't be subject to the proxy should pass in NULL as the proxy // pointer. - instantiate_connection(m_timer.get_io_service() + instantiate_connection(libtorrent::get_io_service(m_timer) , proxy ? *proxy : null_proxy, m_sock, userdata, NULL, false, false); if (m_bind_addr) @@ -358,7 +358,7 @@ m_sock.bind(tcp::endpoint(*m_bind_addr, 0), ec); if (ec) { - m_timer.get_io_service().post(boost::bind(&http_connection::callback + libtorrent::get_io_service(m_timer).post(boost::bind(&http_connection::callback , me, ec, static_cast(NULL), 0)); return; } @@ -367,7 +367,7 @@ setup_ssl_hostname(m_sock, hostname, ec); if (ec) { - m_timer.get_io_service().post(boost::bind(&http_connection::callback + libtorrent::get_io_service(m_timer).post(boost::bind(&http_connection::callback , me, ec, static_cast(NULL), 0)); return; } --- libtorrent-rasterbar-1.0.11/src/natpmp.cpp.orig 2017-02-04 19:16:33.000000000 +0100 +++ libtorrent-rasterbar-1.0.11/src/natpmp.cpp 2019-04-27 20:27:53.220415927 +0200 @@ -88,7 +88,7 @@ mutex::scoped_lock l(m_mutex); error_code ec; - address gateway = get_default_gateway(m_socket.get_io_service(), ec); + address gateway = get_default_gateway(libtorrent::get_io_service(m_socket), ec); if (ec) { char msg[200]; --- libtorrent-rasterbar-1.1.11/src/lsd.cpp.orig 2018-11-18 13:55:50.000000000 +0100 +++ libtorrent-rasterbar-1.1.11/src/lsd.cpp 2019-04-28 19:35:37.014019062 +0200 @@ -112,12 +112,12 @@ void lsd::start(error_code& ec) { m_socket.open(boost::bind(&lsd::on_announce, self(), _1, _2, _3) - , m_broadcast_timer.get_io_service(), ec); + , libtorrent::get_io_service(m_broadcast_timer), ec); if (ec) return; #if TORRENT_USE_IPV6 m_socket6.open(boost::bind(&lsd::on_announce, self(), _1, _2, _3) - , m_broadcast_timer.get_io_service(), ec); + , libtorrent::get_io_service(m_broadcast_timer), ec); #endif } --- libtorrent-rasterbar-1.1.11/src/upnp.cpp.orig 2018-11-18 13:55:54.000000000 +0100 +++ libtorrent-rasterbar-1.1.11/src/upnp.cpp 2019-04-28 20:23:06.875246705 +0200 @@ -135,7 +135,7 @@ { error_code ec; m_socket.open(boost::bind(&upnp::on_reply, self(), _1, _2, _3) - , m_refresh_timer.get_io_service(), ec); + , libtorrent::get_io_service(m_refresh_timer), ec); m_mappings.reserve(10); }