Browse Source

check for boost version

pull/645/head
orignal 8 years ago
parent
commit
e5e09c9b51
  1. 8
      RouterInfo.cpp

8
RouterInfo.cpp

@ -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;

Loading…
Cancel
Save