1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 12:24:19 +00:00

check for boost version

This commit is contained in:
orignal 2016-09-24 08:29:08 -04:00
parent 5b8d1df349
commit e5e09c9b51

View File

@ -3,8 +3,10 @@
#include "I2PEndian.h" #include "I2PEndian.h"
#include <fstream> #include <fstream>
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <boost/atomic.hpp>
#include <boost/make_shared.hpp> #include <boost/make_shared.hpp>
#if (BOOST_VERSION >= 105300)
#include <boost/atomic.hpp>
#endif
#include "version.h" #include "version.h"
#include "Crypto.h" #include "Crypto.h"
#include "Base.h" #include "Base.h"
@ -257,7 +259,11 @@ namespace data
m_SupportedTransports |= supportedTransports; m_SupportedTransports |= supportedTransports;
} }
} }
#if (BOOST_VERSION >= 105300)
boost::atomic_store (&m_Addresses, addresses); boost::atomic_store (&m_Addresses, addresses);
#else
m_Addresses = addresses; // race condition
#endif
// read peers // read peers
uint8_t numPeers; uint8_t numPeers;
s.read ((char *)&numPeers, sizeof (numPeers)); if (!s) return; s.read ((char *)&numPeers, sizeof (numPeers)); if (!s) return;