https://github.com/isc-projects/kea/pull/143
https://946488.bugs.gentoo.org/attachment.cgi?id=914160

Index: src/lib/asiolink/io_service.cc
--- src/lib/asiolink/io_service.cc.orig
+++ src/lib/asiolink/io_service.cc
@@ -24,8 +24,7 @@ class IOServiceImpl { (private)
 public:
     /// \brief The constructor
     IOServiceImpl() :
-        io_service_(),
-        work_(new boost::asio::io_service::work(io_service_)) {
+        io_context_() {
     };
 
     /// \brief The destructor.
@@ -37,7 +36,7 @@ class IOServiceImpl { (private)
     /// This method does not return control to the caller until
     /// the \c stop() method is called via some handler.
     void run() {
-        io_service_.run();
+        io_context_.run();
     };
 
     /// \brief Run the underlying event loop for a single event.
@@ -46,7 +45,7 @@ class IOServiceImpl { (private)
     /// first handler has completed.  (If no handlers are ready when
     /// it is run, it will block until one is.)
     void run_one() {
-        io_service_.run_one();
+        io_context_.run_one();
     };
 
     /// \brief Run the underlying event loop for a ready events.
@@ -54,32 +53,32 @@ class IOServiceImpl { (private)
     /// This method executes handlers for all ready events and returns.
     /// It will return immediately if there are no ready events.
     void poll() {
-        io_service_.poll();
+        io_context_.poll();
     };
 
     /// \brief Stop the underlying event loop.
     ///
     /// This will return the control to the caller of the \c run() method.
     void stop() {
-        io_service_.stop();
+        io_context_.stop();
     }
 
     /// \brief Indicates if the IOService has been stopped.
     ///
     /// \return true if the IOService has been stopped, false otherwise.
     bool stopped() const {
-        return (io_service_.stopped());
+        return (io_context_.stopped());
     }
 
     /// \brief Restarts the IOService in preparation for a subsequent \c run() invocation.
     void restart() {
-        io_service_.reset();
+        io_context_.restart();
     }
 
     /// \brief Removes IO service work object to let it finish running
     /// when all handlers have been invoked.
     void stopWork() {
-        work_.reset();
+        io_context_.stop();
     }
 
     /// \brief Return the native \c io_service object used in this wrapper.
@@ -88,20 +87,19 @@ class IOServiceImpl { (private)
     /// that share the same \c io_service with the authoritative server.
     /// It will eventually be removed once the wrapper interface is
     /// generalized.
-    boost::asio::io_service& get_io_service() {
-        return (io_service_);
+    boost::asio::io_context& get_io_context() {
+        return (io_context_);
     }
 
     /// \brief Post a callback on the IO service
     ///
     /// \param callback The callback to be run on the IO service.
     void post(const std::function<void ()>& callback) {
-        io_service_.post(callback);
+        boost::asio::post(io_context_, callback);
     }
 
 private:
-    boost::asio::io_service io_service_;
-    boost::shared_ptr<boost::asio::io_service::work> work_;
+    boost::asio::io_context io_context_;
 };
 
 IOService::IOService() : io_impl_(new IOServiceImpl()) {
@@ -147,7 +145,7 @@ IOService::stopWork() {
 
 boost::asio::io_service&
 IOService::get_io_service() {
-    return (io_impl_->get_io_service());
+    return (io_impl_->get_io_context());
 }
 
 void
