forked from premiere/premiere-libtorrent
fix build with boost-1.34.1
This commit is contained in:
parent
c62c4fc783
commit
a9a12a2391
|
@ -34,7 +34,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#define TORRENT_POLICY_HPP_INCLUDED
|
#define TORRENT_POLICY_HPP_INCLUDED
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <set>
|
#include <deque>
|
||||||
|
|
||||||
#include "libtorrent/peer.hpp"
|
#include "libtorrent/peer.hpp"
|
||||||
#include "libtorrent/piece_picker.hpp"
|
#include "libtorrent/piece_picker.hpp"
|
||||||
|
|
|
@ -56,6 +56,10 @@ namespace libtorrent {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if BOOST_VERSION < 103500
|
||||||
|
typedef asio::error::error_category socks_error_category;
|
||||||
|
#else
|
||||||
|
|
||||||
struct TORRENT_EXPORT socks_error_category : boost::system::error_category
|
struct TORRENT_EXPORT socks_error_category : boost::system::error_category
|
||||||
{
|
{
|
||||||
virtual const char* name() const;
|
virtual const char* name() const;
|
||||||
|
@ -64,6 +68,8 @@ struct TORRENT_EXPORT socks_error_category : boost::system::error_category
|
||||||
{ return boost::system::error_condition(ev, *this); }
|
{ return boost::system::error_condition(ev, *this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
extern socks_error_category socks_category;
|
extern socks_error_category socks_category;
|
||||||
|
|
||||||
class socks5_stream : public proxy_base
|
class socks5_stream : public proxy_base
|
||||||
|
|
|
@ -172,7 +172,10 @@ namespace libtorrent
|
||||||
void connection_queue::try_connect(connection_queue::mutex_t::scoped_lock& l)
|
void connection_queue::try_connect(connection_queue::mutex_t::scoped_lock& l)
|
||||||
{
|
{
|
||||||
INVARIANT_CHECK;
|
INVARIANT_CHECK;
|
||||||
|
|
||||||
|
#if BOOST_VERSION >= 103700
|
||||||
TORRENT_ASSERT(l.owns_lock());
|
TORRENT_ASSERT(l.owns_lock());
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef TORRENT_CONNECTION_LOGGING
|
#ifdef TORRENT_CONNECTION_LOGGING
|
||||||
m_log << log_time() << " " << free_slots() << std::endl;
|
m_log << log_time() << " " << free_slots() << std::endl;
|
||||||
|
|
|
@ -1749,6 +1749,7 @@ namespace libtorrent
|
||||||
{
|
{
|
||||||
ptime now = time_now_hires();
|
ptime now = time_now_hires();
|
||||||
TORRENT_ASSERT(now >= m_last_file_check);
|
TORRENT_ASSERT(now >= m_last_file_check);
|
||||||
|
#if BOOST_VERSION > 103600
|
||||||
if (now - m_last_file_check < milliseconds(m_settings.file_checks_delay_per_block))
|
if (now - m_last_file_check < milliseconds(m_settings.file_checks_delay_per_block))
|
||||||
{
|
{
|
||||||
int sleep_time = m_settings.file_checks_delay_per_block
|
int sleep_time = m_settings.file_checks_delay_per_block
|
||||||
|
@ -1761,6 +1762,7 @@ namespace libtorrent
|
||||||
+ boost::posix_time::milliseconds(sleep_time));
|
+ boost::posix_time::milliseconds(sleep_time));
|
||||||
}
|
}
|
||||||
m_last_file_check = time_now_hires();
|
m_last_file_check = time_now_hires();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (m_waiting_to_shutdown) break;
|
if (m_waiting_to_shutdown) break;
|
||||||
|
|
||||||
|
|
|
@ -1059,13 +1059,13 @@ namespace aux {
|
||||||
error_code ec;
|
error_code ec;
|
||||||
if (m_settings.send_socket_buffer_size)
|
if (m_settings.send_socket_buffer_size)
|
||||||
{
|
{
|
||||||
boost::asio::socket_base::send_buffer_size option(
|
stream_socket::send_buffer_size option(
|
||||||
m_settings.send_socket_buffer_size);
|
m_settings.send_socket_buffer_size);
|
||||||
s.set_option(option, ec);
|
s.set_option(option, ec);
|
||||||
}
|
}
|
||||||
if (m_settings.recv_socket_buffer_size)
|
if (m_settings.recv_socket_buffer_size)
|
||||||
{
|
{
|
||||||
boost::asio::socket_base::receive_buffer_size option(
|
stream_socket::receive_buffer_size option(
|
||||||
m_settings.recv_socket_buffer_size);
|
m_settings.recv_socket_buffer_size);
|
||||||
s.set_option(option, ec);
|
s.set_option(option, ec);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,7 @@ namespace libtorrent
|
||||||
|
|
||||||
socks_error_category socks_category;
|
socks_error_category socks_category;
|
||||||
|
|
||||||
|
#if BOOST_VERSION >= 103500
|
||||||
const char* socks_error_category::name() const
|
const char* socks_error_category::name() const
|
||||||
{
|
{
|
||||||
return "socks error";
|
return "socks error";
|
||||||
|
@ -64,6 +65,7 @@ namespace libtorrent
|
||||||
if (ev < 0 || ev > socks_error::num_errors) return "unknown error";
|
if (ev < 0 || ev > socks_error::num_errors) return "unknown error";
|
||||||
return messages[ev];
|
return messages[ev];
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void socks5_stream::name_lookup(error_code const& e, tcp::resolver::iterator i
|
void socks5_stream::name_lookup(error_code const& e, tcp::resolver::iterator i
|
||||||
, boost::shared_ptr<handler_type> h)
|
, boost::shared_ptr<handler_type> h)
|
||||||
|
|
Loading…
Reference in New Issue