[sword/f17] Fix compile error with gcc-4.7
Deji Akingunola
deji at fedoraproject.org
Thu Feb 23 04:01:03 UTC 2012
commit 25fcdb8d4547dc5b24c6680f9602a5082eee76f5
Author: Deji Akingunola <dakingun at gmail.com>
Date: Wed Feb 22 23:01:02 2012 -0500
Fix compile error with gcc-4.7
sword-gcc47-fix.patch | 22 ++++++++++++++++++++++
sword.spec | 7 ++++++-
2 files changed, 28 insertions(+), 1 deletions(-)
---
diff --git a/sword-gcc47-fix.patch b/sword-gcc47-fix.patch
new file mode 100644
index 0000000..2509c66
--- /dev/null
+++ b/sword-gcc47-fix.patch
@@ -0,0 +1,22 @@
+--- include/multimapwdef.h 2004-05-04 17:01:39.000000000 -0400
++++ include/multimapwdef.h.new 2012-02-22 22:05:38.034034838 -0500
+@@ -19,14 +19,14 @@
+ }
+
+ T& operator[](const Key& k) {
+- if (find(k) == this->end()) {
+- insert(value_type(k, T()));
++ if (this->find(k) == this->end()) {
++ this->insert(value_type(k, T()));
+ }
+- return (*(find(k))).second;
++ return (*(this->find(k))).second;
+ }
+ bool has(const Key& k, const T &val) const {
+- typename std::multimap<Key, T, Compare>::const_iterator start = lower_bound(k);
+- typename std::multimap<Key, T, Compare>::const_iterator end = upper_bound(k);
++ typename std::multimap<Key, T, Compare>::const_iterator start = this->lower_bound(k);
++ typename std::multimap<Key, T, Compare>::const_iterator end = this->upper_bound(k);
+ for (; start!=end; start++) {
+ if (start->second == val)
+ return true;
diff --git a/sword.spec b/sword.spec
index a5103a4..2acc76e 100644
--- a/sword.spec
+++ b/sword.spec
@@ -1,6 +1,6 @@
Name: sword
Version: 1.6.2
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Free Bible Software Project
Group: System Environment/Libraries
@@ -18,6 +18,7 @@ BuildRequires: cppunit-devel
Patch0: sword-no-curl-types.patch
Patch1: sword-1.6.2-clucene2.patch
+Patch2: sword-gcc47-fix.patch
%description
The SWORD Project is the CrossWire Bible Society's free Bible software
@@ -45,6 +46,7 @@ that uses the sword API, such as Gnomesword or Bibletime.
%setup -q
%patch0 -p1 -b .no-curl-types
%patch1 -p1 -b .clucene2
+%patch2 -p0 -b .gcc47
%build
%configure --disable-static --with-icu --with-clucene=%{_prefix}
@@ -87,6 +89,9 @@ rm -rf %{buildroot}
%{_libdir}/libsword.so
%changelog
+* Wed Feb 22 2012 Deji Akingunola <dakingun at gmail.com> - 1.6.2-7
+- Fix compile error with gcc-4.7
+
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.6.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list