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)
6 The service template parameters are disabled by default for now.
7 Use BOOST_ASIO_ENABLE_OLD_SERVICES macro to enable the old interface.
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(-)
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
20 #include "../mapping/CMap.h"
21 #include "../CGameState.h"
23 +#if BOOST_VERSION >= 106600
24 +#define BOOST_ASIO_ENABLE_OLD_SERVICES
26 #include <boost/asio.hpp>
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
38 +#if BOOST_VERSION >= 106600 // Boost version >= 1.66
40 + typedef io_context io_service;
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
54 +#if BOOST_VERSION >= 106600
55 +#define BOOST_ASIO_ENABLE_OLD_SERVICES
57 #include <boost/asio.hpp>
\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
70 +#if BOOST_VERSION >= 106600 // Boost version >= 1.66
72 + typedef io_context io_service;
77 template <typename Protocol> class stream_socket_service;
\r
78 template <typename Protocol,typename StreamSocketService>
\r