From 51c544c6bb810e59c83c95b013474128afcecc42 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 5 Feb 2010 08:40:08 +0000 Subject: [PATCH] fixed trunk build with DHT disabled --- src/session_impl.cpp | 4 ++++ test/test_dht.cpp | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index bb9f36f37..0dcd7ae5a 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -507,7 +507,9 @@ namespace aux { PRINT_SIZEOF(address_v6::bytes_type) #endif PRINT_SIZEOF(void*) +#ifndef TORRENT_DISABLE_DHT PRINT_SIZEOF(dht::node_entry) +#endif PRINT_SIZEOF(policy::peer) PRINT_OFFSETOF(policy::peer, connection) @@ -521,9 +523,11 @@ namespace aux { PRINT_SIZEOF(policy::ipv6_peer) #endif +#ifndef TORRENT_DISABLE_DHT PRINT_SIZEOF(dht::find_data_observer) PRINT_SIZEOF(dht::announce_observer) PRINT_SIZEOF(dht::null_observer) +#endif #undef PRINT_OFFSETOF #undef PRINT_SIZEOF diff --git a/test/test_dht.cpp b/test/test_dht.cpp index 2634d8acb..eef838198 100644 --- a/test/test_dht.cpp +++ b/test/test_dht.cpp @@ -30,6 +30,8 @@ POSSIBILITY OF SUCH DAMAGE. */ +#ifndef TORRENT_DISABLE_DHT + #include "libtorrent/session.hpp" #include "libtorrent/kademlia/node.hpp" // for verify_message #include "libtorrent/bencode.hpp" @@ -134,3 +136,12 @@ int test_main() return 0; } +#else + +int test_main() +{ + return 0; +} + +#endif +