summaryrefslogtreecommitdiff
path: root/dev-libs/botan/files/botan-2.9.0-build.patch
blob: 6208ffdbf0ad895b014d6686019bad2b5b722a0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
From 86df247e4f090f984e050962ed5a4a536ec63b33 Mon Sep 17 00:00:00 2001
From: Ralf van der Enden <Ralf.vanderEnden@deltares.nl>
Date: Fri, 5 Apr 2019 14:58:14 +0200
Subject: [PATCH] boost 1.70 compatibility

Fixes issue #82
---
 src/cli/tls_http_server.cpp | 8 +++++++-
 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 cc59a71c33..0a6428cd65 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 49ffbe3766..42ce156b12 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,