From 646f761c32044736c485f68c9370ea4d537abc5d Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 11 Apr 2012 16:35:16 +0000 Subject: [PATCH] merged compatibility patch from RC_0_16 --- include/libtorrent/config.hpp | 14 ++++++++++++++ src/asio.cpp | 6 +++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/include/libtorrent/config.hpp b/include/libtorrent/config.hpp index bea1e2f90..2acabd85b 100644 --- a/include/libtorrent/config.hpp +++ b/include/libtorrent/config.hpp @@ -67,6 +67,20 @@ POSSIBILITY OF SUCH DAMAGE. #endif #endif +// backwards compatibility with older versions of boost +#if !defined BOOST_SYMBOL_EXPORT && !defined BOOST_SYMBOL_IMPORT +# ifdef _MSC_VER +# define BOOST_SYMBOL_EXPORT __declspec(dllexport) +# define BOOST_SYMBOL_IMPORT __declspec(dllimport) +# elif __GNU__ >= 4 +# define BOOST_SYMBOL_EXPORT __attribute__((visibility("default"))) +# define BOOST_SYMBOL_IMPORT __attribute__((visibility("default"))) +# else +# define BOOST_SYMBOL_EXPORT +# define BOOST_SYMBOL_IMPORT +# endif +#endif + #if defined TORRENT_BUILDING_SHARED # define TORRENT_EXPORT BOOST_SYMBOL_EXPORT #elif defined TORRENT_LINKING_SHARED diff --git a/src/asio.cpp b/src/asio.cpp index 2fa5ef975..58f5fa796 100644 --- a/src/asio.cpp +++ b/src/asio.cpp @@ -1,3 +1,7 @@ // builds all boost.asio source as a separate compilation unit -#include +#include + +#if BOOST_VERSION >= 104610 +#include +#endif