[kdepim] fix build with g++ 4.7

Radek Novacek rnovacek at fedoraproject.org
Thu Jan 5 12:57:20 UTC 2012


commit e8ba7949cb0d86ddd8687ab291b44a9a69c679c9
Author: Radek Novacek <rnovacek at redhat.com>
Date:   Thu Jan 5 13:57:13 2012 +0100

    fix build with g++ 4.7

 kdepim-4.7.97-fix-for-g++47.patch |   13 +++++++++++++
 kdepim.spec                       |    5 +++++
 2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/kdepim-4.7.97-fix-for-g++47.patch b/kdepim-4.7.97-fix-for-g++47.patch
new file mode 100644
index 0000000..c1332a3
--- /dev/null
+++ b/kdepim-4.7.97-fix-for-g++47.patch
@@ -0,0 +1,13 @@
+diff -up kdepim-4.7.97/akregator/plugins/mk4storage/metakit/src/string.cpp.fix-for-g++47 kdepim-4.7.97/akregator/plugins/mk4storage/metakit/src/string.cpp
+--- kdepim-4.7.97/akregator/plugins/mk4storage/metakit/src/string.cpp.fix-for-g++47	2012-01-05 13:54:31.306608361 +0100
++++ kdepim-4.7.97/akregator/plugins/mk4storage/metakit/src/string.cpp	2012-01-05 13:55:02.315368262 +0100
+@@ -119,7 +119,8 @@ c4_String::c4_String(char ch, int n /* =
+   _value = new unsigned char[n + 3];
+ 
+   _value[0] = 1; // see Init() member
+-  memset(_value + 2, ch, n);
++  if (n > 0)
++    memset(_value + 2, ch, n);
+   _value[1] = (unsigned char)(n <= 255 ? n : 255);
+   _value[n + 2] = 0;
+ }
diff --git a/kdepim.spec b/kdepim.spec
index c0ce980..8521ee0 100644
--- a/kdepim.spec
+++ b/kdepim.spec
@@ -16,6 +16,9 @@ Patch0:  kdepim-4.5.85-install-headers.patch
 # fix KMail migration (kde#283563)
 Patch2: kdepim-4.7.2-kmail-migration.patch
 
+# fix build with g++4.7
+Patch3: kdepim-4.7.97-fix-for-g++47.patch
+
 # upstream patches
 
 Provides: kdepim4 = %{version}-%{release}
@@ -89,6 +92,7 @@ Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
 
 %patch0 -p1 -b .install-headers
 %patch2 -p1 -b .kmail-migration
+%patch3 -p1 -b .fix-for-g++47
 
 
 %build
@@ -213,6 +217,7 @@ rm -rf %{buildroot}
 %changelog
 * Wed Jan 04 2012 Radek Novacek <rnovacek at redhat.com> - 7:4.7.97-1
 - 4.7.97
+- fix build with g++ 4.7
 
 * Wed Dec 21 2011 Radek Novacek <rnovacek at redhat.com> - 7:4.7.95-1
 - 4.7.95


More information about the scm-commits mailing list