From 573d9f55d6974969c73e873d554196818490afb6 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 12 May 2007 18:24:14 +0000 Subject: [PATCH] fixed compilation error when not using boost.date_time. Fixed compilation error when not having DHT logging enabled --- include/libtorrent/kademlia/node.hpp | 4 +++- include/libtorrent/time.hpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/libtorrent/kademlia/node.hpp b/include/libtorrent/kademlia/node.hpp index 78323c2f0..8752af833 100644 --- a/include/libtorrent/kademlia/node.hpp +++ b/include/libtorrent/kademlia/node.hpp @@ -123,9 +123,11 @@ public: data_iterator end_data() { return m_map.end(); } int data_size() const { return int(m_map.size()); } +#ifdef TORRENT_DHT_VERBOSE_LOGGING void print_state(std::ostream& os) const { m_table.print_state(os); } - +#endif + void announce(sha1_hash const& info_hash, int listen_port , boost::function const& , sha1_hash const&)> f); diff --git a/include/libtorrent/time.hpp b/include/libtorrent/time.hpp index b5fbc0ad1..2470522c0 100644 --- a/include/libtorrent/time.hpp +++ b/include/libtorrent/time.hpp @@ -91,6 +91,7 @@ namespace libtorrent struct time_duration { time_duration() {} + time_duration operator/(int rhs) const { return time_duration(diff / rhs); } explicit time_duration(boost::int64_t d) : diff(d) {} boost::int64_t diff; };