diff --git a/Jamfile b/Jamfile index 38c82d7d9..ea2bce8c9 100755 --- a/Jamfile +++ b/Jamfile @@ -264,7 +264,7 @@ rule building ( properties * ) # in shared object interfaces, so when it's # enabled, just export everything (since we're) # probably not a production build anyway - && !on in $(properties) + && ! on in $(properties) { # hide non-external symbols # use ms-compat because boost.asio (as of 1.47.0 diff --git a/src/asio.cpp b/src/asio.cpp index 0688e3f2b..52cc3c48c 100644 --- a/src/asio.cpp +++ b/src/asio.cpp @@ -79,6 +79,16 @@ #else // _MSC_VER +#include "libtorrent/config.hpp" + +#define TORRENT_HAS_ASIO_DECL x ## BOOST_ASIO_DECL + +// only define BOOST_ASIO_DECL if it hasn't already been defined +// or if it has been defined to an empty string +#if TORRENT_HAS_ASIO_DECL == x +#define BOOST_ASIO_DECL BOOST_SYMBOL_EXPORT +#endif + #if BOOST_VERSION >= 104500 #include #elif BOOST_VERSION >= 104400