From 158cb797c6462084768c29af6f277b7ce5fac525 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 22 Jul 2013 15:50:19 +0000 Subject: [PATCH] fix warning when building without IPv6 support --- include/libtorrent/torrent_handle.hpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/include/libtorrent/torrent_handle.hpp b/include/libtorrent/torrent_handle.hpp index 869c7518b..149ce0e3f 100644 --- a/include/libtorrent/torrent_handle.hpp +++ b/include/libtorrent/torrent_handle.hpp @@ -122,19 +122,22 @@ namespace libtorrent // number of bytes downloaded in this block unsigned bytes_progress:15; + // the total number of bytes in this block unsigned block_size:15; - private: - // the type of the addr union - unsigned is_v6_addr:1; -// unsigned unused:1; - public: + // the state this block is in (see block_state_t) unsigned state:2; + // the number of peers that has requested this block // typically 0 or 1. If > 1, this block is in // end game mode unsigned num_peers:14; + private: +#if TORRENT_USE_IPV6 + // the type of the addr union + unsigned is_v6_addr:1; +#endif }; struct TORRENT_EXPORT partial_piece_info