diff options
author | Giovanni Mascellani <gio@debian.org> | 2020-01-06 12:25:03 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-01-06 14:02:30 +0100 |
commit | 760302453396dcad193570889030e267c971834d (patch) | |
tree | 65d496646e294b050f0a43b5a7b3613606d34161 /src/syncServer.cpp | |
parent | fix build with boost 1.67 (diff) |
Fix build with Boost 1.71.
get_io_service() was deprecated in favour of get_executor() starting
from Boost 1.70.
Diffstat (limited to 'src/syncServer.cpp')
-rw-r--r-- | src/syncServer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/syncServer.cpp b/src/syncServer.cpp index 1e6e352..21302c2 100644 --- a/src/syncServer.cpp +++ b/src/syncServer.cpp @@ -125,7 +125,11 @@ void SyncServer::start_accept() std::list<AcceptorsElement>::iterator it = acceptors_.begin(); for(; it != acceptors_.end(); ++it) { if(!it->started_) { +#if BOOST_VERSION >= 107000 + SyncTcpConnection::pointer new_connection = SyncTcpConnection::create(it->acceptor_->get_executor()); +#else SyncTcpConnection::pointer new_connection = SyncTcpConnection::create(it->acceptor_->get_io_service()); +#endif conns_.push_back(new_connection); it->acceptor_->async_accept(new_connection->socket(), boost::bind(&SyncServer::handle_accept, this, new_connection, boost::asio::placeholders::error, it)); |