]>
Commit | Line | Data |
---|---|---|
d0515a20 JR |
1 | From 83c6ffbda0f373848e11b81f128647bfcaed024f Mon Sep 17 00:00:00 2001 |
2 | From: Raphnalor <37222713+Raphnalor@users.noreply.github.com> | |
3 | Date: Sun, 11 Mar 2018 16:02:20 +0300 | |
4 | Subject: [PATCH] Reflect changes in boost::asio released in Boost 1.66. (#428) | |
5 | ||
6 | The service template parameters are disabled by default for now. | |
7 | Use BOOST_ASIO_ENABLE_OLD_SERVICES macro to enable the old interface. | |
8 | --- | |
9 | lib/serializer/Connection.cpp | 3 +++ | |
10 | lib/serializer/Connection.h | 6 ++++++ | |
11 | server/CVCMIServer.cpp | 3 +++ | |
12 | server/CVCMIServer.h | 8 +++++++- | |
13 | 4 files changed, 19 insertions(+), 1 deletion(-) | |
14 | ||
15 | diff --git a/lib/serializer/Connection.cpp b/lib/serializer/Connection.cpp | |
16 | index 0a842d1d3..ae1810e8b 100644 | |
17 | --- a/lib/serializer/Connection.cpp | |
18 | +++ b/lib/serializer/Connection.cpp | |
19 | @@ -14,6 +14,9 @@ | |
20 | #include "../mapping/CMap.h" | |
21 | #include "../CGameState.h" | |
22 | ||
23 | +#if BOOST_VERSION >= 106600 | |
24 | +#define BOOST_ASIO_ENABLE_OLD_SERVICES | |
25 | +#endif | |
26 | #include <boost/asio.hpp> | |
27 | ||
28 | using namespace boost; | |
29 | diff --git a/lib/serializer/Connection.h b/lib/serializer/Connection.h | |
30 | index b6ceee7a0..cb134e2b6 100644 | |
31 | --- a/lib/serializer/Connection.h | |
32 | +++ b/lib/serializer/Connection.h | |
33 | @@ -22,7 +22,13 @@ namespace boost | |
34 | { | |
35 | class tcp; | |
36 | } | |
37 | + | |
38 | +#if BOOST_VERSION >= 106600 // Boost version >= 1.66 | |
39 | + class io_context; | |
40 | + typedef io_context io_service; | |
41 | +#else | |
42 | class io_service; | |
43 | +#endif | |
44 | ||
45 | template <typename Protocol> class stream_socket_service; | |
46 | template <typename Protocol,typename StreamSocketService> | |
47 | diff --git a/server/CVCMIServer.cpp b/server/CVCMIServer.cpp | |
48 | index b077607be..d459a8e95 100644 | |
49 | --- a/server/CVCMIServer.cpp | |
50 | +++ b/server/CVCMIServer.cpp | |
51 | @@ -9,5 +9,8 @@ | |
52 | #include "StdInc.h"\r | |
53 | \r | |
54 | +#if BOOST_VERSION >= 106600 | |
55 | +#define BOOST_ASIO_ENABLE_OLD_SERVICES | |
56 | +#endif\r | |
57 | #include <boost/asio.hpp>\r | |
58 | \r | |
59 | #include "../lib/filesystem/Filesystem.h"\r | |
60 | diff --git a/server/CVCMIServer.h b/server/CVCMIServer.h | |
61 | index 6fa7ad5bb..ad9951f64 100644 | |
62 | --- a/server/CVCMIServer.h | |
63 | +++ b/server/CVCMIServer.h | |
64 | @@ -26,7 +26,13 @@ namespace boost | |
65 | {\r | |
66 | class tcp;\r | |
67 | }\r | |
68 | - class io_service;\r | |
69 | +\r | |
70 | +#if BOOST_VERSION >= 106600 // Boost version >= 1.66 | |
71 | + class io_context; | |
72 | + typedef io_context io_service; | |
73 | +#else | |
74 | + class io_service; | |
75 | +#endif\r | |
76 | \r | |
77 | template <typename Protocol> class stream_socket_service;\r | |
78 | template <typename Protocol,typename StreamSocketService>\r |