diff --git a/src/session_impl.cpp b/src/session_impl.cpp index dd2ae93ae..63e5465c6 100755 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -625,6 +625,7 @@ namespace detail "\n"; m_buffer_usage_logger.open("buffer_stats.log", std::ios::trunc); m_second_counter = 0; + m_buffer_allocations = 0; #endif // ---- generate a peer id ---- diff --git a/src/ut_metadata.cpp b/src/ut_metadata.cpp index 4be2ca9e3..34f39deda 100644 --- a/src/ut_metadata.cpp +++ b/src/ut_metadata.cpp @@ -56,6 +56,9 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/extensions.hpp" #include "libtorrent/extensions/metadata_transfer.hpp" #include "libtorrent/alert_types.hpp" +#ifdef TORRENT_STATS +#include "libtorrent/aux_/session_impl.hpp" +#endif namespace libtorrent { namespace {