aboutsummaryrefslogtreecommitdiffstats
path: root/community/anytun/boost-1740.patch
blob: 9e5172d4405627526f6a8a8fa6a72fe51ecdbc14 (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
Description: Fix FTBFS against boost1.74
Author: Anton Gladky <gladk@debian.org>
Bug-Debian: https://bugs.debian.org/977219 
Last-Update: 2020-12-14

Index: anytun-0.3.7/src/syncTcpConnection.cpp
===================================================================
--- src/syncTcpConnection.cpp
+++ src/syncTcpConnection.cpp
@@ -67,7 +67,12 @@ void SyncTcpConnection::Send(std::string
                                        boost::asio::placeholders::bytes_transferred));
 }
 
-#if BOOST_VERSION >= 107000
+#if BOOST_VERSION >= 107300
+SyncTcpConnection::SyncTcpConnection(const boost::asio::basic_socket_acceptor<boost::asio::ip::tcp>::executor_type& executor)
+  : socket_(executor)
+{
+}
+#elif BOOST_VERSION >= 107000
 SyncTcpConnection::SyncTcpConnection(const boost::asio::executor& executor)
   : socket_(executor)
 {
Index: anytun-0.3.7/src/syncTcpConnection.h
===================================================================
--- src/syncTcpConnection.h
+++ src/syncTcpConnection.h
@@ -46,6 +46,9 @@
 #ifndef ANYTUN_syncTcpConnection_h_INCLUDED
 #define ANYTUN_syncTcpConnection_h_INCLUDED
 
+#define BOOST_ASIO_NO_TS_EXECUTORS
+
+
 #include <boost/shared_ptr.hpp>
 #include <boost/enable_shared_from_this.hpp>
 #include <boost/function.hpp>
@@ -60,7 +63,11 @@ public:
   typedef boost::shared_ptr<SyncTcpConnection> pointer;
   typedef boost::asio::ip::tcp proto;
 
-#if BOOST_VERSION >= 107000
+#if BOOST_VERSION >= 107300
+  static pointer create(const boost::asio::basic_socket_acceptor<boost::asio::ip::tcp>::executor_type& executor) {
+    return pointer(new SyncTcpConnection(executor));
+  };
+#elif BOOST_VERSION >= 107000
   static pointer create(const boost::asio::executor& executor) {
     return pointer(new SyncTcpConnection(executor));
   };
@@ -76,7 +83,9 @@ public:
   void start();
   void Send(std::string message);
 private:
-#if BOOST_VERSION >= 107000
+#if BOOST_VERSION >= 107300
+  SyncTcpConnection(const boost::asio::basic_socket_acceptor<boost::asio::ip::tcp>::executor_type& executor);
+#elif BOOST_VERSION >= 107000
   SyncTcpConnection(const boost::asio::executor& executor);
 #else
   SyncTcpConnection(boost::asio::io_service& io_service);