diff options
author | Ralf van der Enden <[email protected]> | 2019-04-05 14:58:14 +0200 |
---|---|---|
committer | Ralf van der Enden <[email protected]> | 2019-04-05 14:58:14 +0200 |
commit | 86df247e4f090f984e050962ed5a4a536ec63b33 (patch) | |
tree | 5e39a6fc3f170fe8fab6402b2380f014d723a970 /src/cli | |
parent | 7beb65eb60767330b1d0acc76517109f54c61e0d (diff) |
boost 1.70 compatibility
Fixes issue #82
Diffstat (limited to 'src/cli')
-rw-r--r-- | src/cli/tls_http_server.cpp | 8 | ||||
-rw-r--r-- | src/cli/tls_proxy.cpp | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/cli/tls_http_server.cpp b/src/cli/tls_http_server.cpp index cc59a71c3..0a6428cd6 100644 --- a/src/cli/tls_http_server.cpp +++ b/src/cli/tls_http_server.cpp @@ -41,6 +41,12 @@ #include "credentials.h" +#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 + namespace Botan_CLI { namespace { @@ -435,7 +441,7 @@ class TLS_Asio_HTTP_Server final session::pointer make_session() { return session::create( - m_acceptor.get_io_service(), + GET_IO_SERVICE(m_acceptor), m_session_manager, m_creds, m_policy); diff --git a/src/cli/tls_proxy.cpp b/src/cli/tls_proxy.cpp index 49ffbe376..42ce156b1 100644 --- a/src/cli/tls_proxy.cpp +++ b/src/cli/tls_proxy.cpp @@ -33,6 +33,12 @@ #include "credentials.h" +#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 + namespace Botan_CLI { namespace { @@ -370,7 +376,7 @@ class tls_proxy_server final session::pointer make_session() { return session::create( - m_acceptor.get_io_service(), + GET_IO_SERVICE(m_acceptor), m_session_manager, m_creds, m_policy, |