]> git.pld-linux.org Git - packages/vcmi.git/blobdiff - boost-1.66.patch
- up to 0.99, still doesn't build with boost 1.70
[packages/vcmi.git] / boost-1.66.patch
diff --git a/boost-1.66.patch b/boost-1.66.patch
new file mode 100644 (file)
index 0000000..2bf9190
--- /dev/null
@@ -0,0 +1,78 @@
+From 83c6ffbda0f373848e11b81f128647bfcaed024f Mon Sep 17 00:00:00 2001
+From: Raphnalor <37222713+Raphnalor@users.noreply.github.com>
+Date: Sun, 11 Mar 2018 16:02:20 +0300
+Subject: [PATCH] Reflect changes in boost::asio released in Boost 1.66. (#428)
+
+The service template parameters are disabled by default for now.
+Use BOOST_ASIO_ENABLE_OLD_SERVICES macro to enable the old interface.
+---
+ lib/serializer/Connection.cpp | 3 +++
+ lib/serializer/Connection.h   | 6 ++++++
+ server/CVCMIServer.cpp        | 3 +++
+ server/CVCMIServer.h          | 8 +++++++-
+ 4 files changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/lib/serializer/Connection.cpp b/lib/serializer/Connection.cpp
+index 0a842d1d3..ae1810e8b 100644
+--- a/lib/serializer/Connection.cpp
++++ b/lib/serializer/Connection.cpp
+@@ -14,6 +14,9 @@
+ #include "../mapping/CMap.h"
+ #include "../CGameState.h"
++#if BOOST_VERSION >= 106600
++#define BOOST_ASIO_ENABLE_OLD_SERVICES
++#endif
+ #include <boost/asio.hpp>
+ using namespace boost;
+diff --git a/lib/serializer/Connection.h b/lib/serializer/Connection.h
+index b6ceee7a0..cb134e2b6 100644
+--- a/lib/serializer/Connection.h
++++ b/lib/serializer/Connection.h
+@@ -22,7 +22,13 @@ namespace boost
+               {
+                       class tcp;
+               }
++
++#if BOOST_VERSION >= 106600  // Boost version >= 1.66
++              class io_context;
++              typedef io_context io_service;
++#else
+               class io_service;
++#endif
+               template <typename Protocol> class stream_socket_service;
+               template <typename Protocol,typename StreamSocketService>
+diff --git a/server/CVCMIServer.cpp b/server/CVCMIServer.cpp
+index b077607be..d459a8e95 100644
+--- a/server/CVCMIServer.cpp
++++ b/server/CVCMIServer.cpp
+@@ -9,5 +9,8 @@
+ #include "StdInc.h"\r
\r
++#if BOOST_VERSION >= 106600
++#define BOOST_ASIO_ENABLE_OLD_SERVICES
++#endif\r
+ #include <boost/asio.hpp>\r
\r
+ #include "../lib/filesystem/Filesystem.h"\r
+diff --git a/server/CVCMIServer.h b/server/CVCMIServer.h
+index 6fa7ad5bb..ad9951f64 100644
+--- a/server/CVCMIServer.h
++++ b/server/CVCMIServer.h
+@@ -26,7 +26,13 @@ namespace boost
+               {\r
+                       class tcp;\r
+               }\r
+-              class io_service;\r
++\r
++#if BOOST_VERSION >= 106600  // Boost version >= 1.66
++              class io_context;
++              typedef io_context io_service;
++#else
++              class io_service;
++#endif\r
\r
+               template <typename Protocol> class stream_socket_service;\r
+               template <typename Protocol,typename StreamSocketService>\r
This page took 0.08168 seconds and 4 git commands to generate.