tag 667361 patch thanks Matthias Klose <[email protected]> (03/04/2012): > Package: rtorrent > Version: 0.8.9-2 > Severity: important > Tags: sid wheezy > User: [email protected] > Usertags: ftbfs-gcc-4.7
Here's a patch to fix this FTBFS. No intent to NMU. Mraw, KiBi.
diff -Nru rtorrent-0.8.9/debian/changelog rtorrent-0.8.9/debian/changelog --- rtorrent-0.8.9/debian/changelog 2011-10-21 00:47:44.000000000 +0000 +++ rtorrent-0.8.9/debian/changelog 2012-04-05 00:05:22.000000000 +0000 @@ -1,3 +1,12 @@ +rtorrent (0.8.9-2.1) UNRELEASED; urgency=low + + * Non-maintainer upload. + * Fix FTBFS with gcc 4.7 (Closes: #667361): + - Fix missing <unistd.h> includes. + - Add “this->” when needed. + + -- Cyril Brulebois <[email protected]> Thu, 05 Apr 2012 00:04:55 +0000 + rtorrent (0.8.9-2) unstable; urgency=medium * Urgency set to medium due to an RC bugfix. Closes: #645737. diff -Nru rtorrent-0.8.9/debian/patches/gcc-4.7.patch rtorrent-0.8.9/debian/patches/gcc-4.7.patch --- rtorrent-0.8.9/debian/patches/gcc-4.7.patch 1970-01-01 00:00:00.000000000 +0000 +++ rtorrent-0.8.9/debian/patches/gcc-4.7.patch 2012-04-05 00:04:42.000000000 +0000 @@ -0,0 +1,59 @@ +--- a/src/core/range_map.h ++++ b/src/core/range_map.h +@@ -102,16 +102,16 @@ private: + template<typename Key, typename T, typename C, typename A> + inline typename RangeMap<Key,T,C,A>::iterator + RangeMap<Key,T,C,A>::crop_overlap(const Key& _begin, const Key& _end) { +- typename RangeMap::iterator itr = upper_bound(_begin); ++ typename RangeMap::iterator itr = this->upper_bound(_begin); + + while (itr != end() && key_comp()(itr->second.first, _end)) { + // There's a subrange before the new begin: need new entry (new range end means new key). + if (key_comp()(itr->second.first, _begin)) +- insert(itr, typename RangeMap::value_type(_begin, itr->second)); ++ this->insert(itr, typename RangeMap::value_type(_begin, itr->second)); + + // Old end is within our range: erase entry. + if (!key_comp()(_end, itr->first)) { +- erase(itr++); ++ this->erase(itr++); + + // Otherwise simply set the new begin of the old range. + } else { +@@ -137,7 +137,7 @@ RangeMap<Key,T,C,A>::set_merge(Key _begi + typename RangeMap::iterator prev = itr; + if (!key_comp()((--prev)->first, _begin) && prev->second.second == value) { + _begin = prev->second.first; +- erase(prev); ++ this->erase(prev); + } + } + +@@ -148,7 +148,7 @@ RangeMap<Key,T,C,A>::set_merge(Key _begi + } + + // Otherwise, this range isn't mergeable, make new entry. +- return insert(itr, typename RangeMap::value_type(_end, typename RangeMap::mapped_type(_begin, value))); ++ return this->insert(itr, typename RangeMap::value_type(_end, typename RangeMap::mapped_type(_begin, value))); + } + + template<typename Key, typename T, typename C, typename A> +@@ -163,7 +163,7 @@ RangeMap<Key,T,C,A>::set_range(const Key + template<typename Key, typename T, typename C, typename A> + inline typename RangeMap<Key,T,C,A>::const_iterator + RangeMap<Key,T,C,A>::find(const Key& key) const { +- typename RangeMap::const_iterator itr = upper_bound(key); ++ typename RangeMap::const_iterator itr = this->upper_bound(key); + + if (itr != end() && key_comp()(key, itr->second.first)) + itr = end(); +--- a/src/thread_base.cc ++++ b/src/thread_base.cc +@@ -45,6 +45,7 @@ + #include <signal.h> + #include <rak/error_number.h> + #include <torrent/exceptions.h> ++#include <unistd.h> + + #include "globals.h" + #include "control.h" diff -Nru rtorrent-0.8.9/debian/patches/series rtorrent-0.8.9/debian/patches/series --- rtorrent-0.8.9/debian/patches/series 2011-10-21 00:29:01.000000000 +0000 +++ rtorrent-0.8.9/debian/patches/series 2012-04-05 00:01:55.000000000 +0000 @@ -1,2 +1,3 @@ remove-tests.patch rtorrent-0.8.6-ipv6-07.patch +gcc-4.7.patch
signature.asc
Description: Digital signature

