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 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 class stream_socket_service; template diff --git a/server/CVCMIServer.cpp b/server/CVCMIServer.cpp index b077607be..d459a8e95 100644 --- a/server/CVCMIServer.cpp +++ b/server/CVCMIServer.cpp @@ -9,6 +9,9 @@ */ #include "StdInc.h" +#if BOOST_VERSION >= 106600 +#define BOOST_ASIO_ENABLE_OLD_SERVICES +#endif #include #include "../lib/filesystem/Filesystem.h" 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 { class tcp; } - class io_service; + +#if BOOST_VERSION >= 106600 // Boost version >= 1.66 + class io_context; + typedef io_context io_service; +#else + class io_service; +#endif template class stream_socket_service; template