[gsmartcontrol] Add patch to fix compilation problem with GCC 4.7.

Eric Smith brouhaha at fedoraproject.org
Tue Jan 17 03:06:26 UTC 2012


commit 476a8cd354b998536e05092087565697bb0cb82f
Author: Eric Smith <eric at p1.brouhaha.com>
Date:   Mon Jan 16 19:06:37 2012 -0800

    Add patch to fix compilation problem with GCC 4.7.

 gsmartcontrol-gcc47-compile-fix.patch |   20 ++++++++++++++++++++
 gsmartcontrol.spec                    |   11 ++++++++++-
 2 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/gsmartcontrol-gcc47-compile-fix.patch b/gsmartcontrol-gcc47-compile-fix.patch
new file mode 100644
index 0000000..85907bf
--- /dev/null
+++ b/gsmartcontrol-gcc47-compile-fix.patch
@@ -0,0 +1,20 @@
+--- src/gsc_text_window.h.orig	2011-08-15 16:20:00.000000000 +0200
++++ src/gsc_text_window.h	2011-08-15 16:21:05.000000000 +0200
+@@ -126,7 +126,7 @@
+ 		// by default, delete_event calls hide().
+ 		bool on_delete_event_before(GdkEventAny* e)
+ 		{
+-			destroy(this);  // deletes this object and nullifies instance
++			this->destroy(this);  // deletes this object and nullifies instance
+ 			return true;  // event handled, don't call default virtual handler
+ 		}
+ 
+@@ -184,7 +184,7 @@
+ 
+ 		void on_close_window_button_clicked()
+ 		{
+-			destroy(this);
++			this->destroy(this);
+ 		}
+ 
+ 
diff --git a/gsmartcontrol.spec b/gsmartcontrol.spec
index c1a6919..003e09d 100644
--- a/gsmartcontrol.spec
+++ b/gsmartcontrol.spec
@@ -1,6 +1,6 @@
 Name:		gsmartcontrol
 Version:	0.8.6
-Release:	4%{?dist}
+Release:	5%{?dist}
 Summary:	Graphical user interface for smartctl
 Group:		Applications/System
 
@@ -23,6 +23,11 @@ Patch0:		gsmartcontrol-console-helper.patch
 # repository, so it should be in the next release.
 Patch1:		gsmartcontrol-0.8.6-glib-2.31-mutex.patch
 
+# Patch to avoid compile errors with GCC 4.7.  Patch supplied by
+# author, and is in upstream source repository, so it should be in the
+# next release.
+Patch2:		gsmartcontrol-gcc47-compile-fix.patch
+
 BuildRequires:	gtkmm24-devel pcre-devel desktop-file-utils
 
 %description
@@ -36,6 +41,7 @@ data to determine its health, as well as run various tests on it.
 %setup -q
 %patch -P 0 -p1 -b .console-helper
 %patch -P 1 -p1 -b .gstaticmutex
+%patch -P 2 -p0 -b .gcc47
 
 %build
 %configure
@@ -105,6 +111,9 @@ fi
 %config(noreplace) %{_sysconfdir}/security/console.apps/%{name}
 
 %changelog
+* Mon Jan 16 2012 Eric Smith <eric at brouhaha.com>  0.8.6-5
+- Patch to compile with GCC 4.7.
+
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8.6-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list