]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
asiolink: fix build with boost 1.66 60/head
authorBartłomiej Piotrowski <bpiotrowski@archlinux.org>
Sat, 30 Dec 2017 13:40:24 +0000 (14:40 +0100)
committerBaptiste Jonglez <git@bitsofnetworks.org>
Sat, 30 Dec 2017 18:07:26 +0000 (19:07 +0100)
- use native_handle() for getting native socket type
- use io_context instead of io_service

src/lib/asiolink/io_acceptor.h
src/lib/asiolink/io_service.h
src/lib/asiolink/tcp_socket.h
src/lib/asiolink/udp_socket.h
src/lib/asiolink/unix_domain_socket.cc

index c493d3427e1ff0d8fd3974606cdbb3f5422e8ab0..913a3280b262c7035252abb6b85d3b5e3f1b6e2e 100644 (file)
@@ -47,7 +47,11 @@ public:
 
     /// @brief Returns file descriptor of the underlying socket.
     virtual int getNative() const {
+#if BOOST_VERSION < 106600
         return (acceptor_->native());
+#else
+        return (acceptor_->native_handle());
+#endif
     }
 
     /// @brief Opens acceptor socket given the endpoint.
index e9e402d1148e4fcd8e912234463eb6b2efd60a15..e0832b2c0498a52a8843fbefa0f61f379d8019b7 100644 (file)
 
 namespace boost {
 namespace asio {
+#if BOOST_VERSION < 106600
     class io_service;
+#else
+    class io_context;
+    typedef io_context io_service;
+#endif
 }
 }
 
index adf74d1f0f2fc12c3acb3b34fd11d23ce666d149..83b8264c854d0d04ba4019c125cce53b26d37ef1 100644 (file)
@@ -75,7 +75,11 @@ public:
 
     /// \brief Return file descriptor of underlying socket
     virtual int getNative() const {
+#if BOOST_VERSION < 106600
         return (socket_.native());
+#else
+        return (socket_.native_handle());
+#endif
     }
 
     /// \brief Return protocol of socket
index 07ba44743e1808a9150149b1d1dd6f81cec807c7..5b040cfe1b2dc023c2a639fb4621f01b244cdf79 100644 (file)
@@ -61,7 +61,11 @@ public:
 
     /// \brief Return file descriptor of underlying socket
     virtual int getNative() const {
+#if BOOST_VERSION < 106600
         return (socket_.native());
+#else
+        return (socket_.native_handle());
+#endif
     }
 
     /// \brief Return protocol of socket
index f17ec2e8f73f5b4452ab65c94892c86a56505be7..d1ad9ec30ca81570fccc31c4678b07cc68163f44 100644 (file)
@@ -287,7 +287,11 @@ UnixDomainSocket::UnixDomainSocket(IOService& io_service)
 
 int
 UnixDomainSocket::getNative() const {
+#if BOOST_VERSION < 106600
     return (impl_->socket_.native());
+#else
+    return (impl_->socket_.native_handle());
+#endif
 }
 
 int