[valknut] fix build with gcc 4.7

Miloš Jakubíček mjakubicek at fedoraproject.org
Sat Jan 21 14:45:46 UTC 2012


commit 2f2c7621a22af90a2134a3577b86f0d7372b3717
Author: Milos Jakubicek <xjakub at fi.muni.cz>
Date:   Sat Jan 21 15:40:21 2012 +0100

    fix build with gcc 4.7

 valknut-gcc4.7.patch |   10 ++++++++++
 valknut.spec         |    9 ++++++++-
 2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/valknut-gcc4.7.patch b/valknut-gcc4.7.patch
new file mode 100644
index 0000000..e0c14ad
--- /dev/null
+++ b/valknut-gcc4.7.patch
@@ -0,0 +1,10 @@
+--- valknut/main.cpp.orig	2012-01-20 10:57:33.179724911 +0100
++++ valknut/main.cpp	2012-01-20 14:33:48.958199340 +0100
+@@ -22,6 +22,7 @@
+ #endif
+ 
+ #include <stdlib.h>
++#include <unistd.h>
+ #ifndef WIN32
+ #include <signal.h>
+ #endif
diff --git a/valknut.spec b/valknut.spec
index 76afbfc..be3e3ae 100644
--- a/valknut.spec
+++ b/valknut.spec
@@ -1,6 +1,6 @@
 Name:           valknut
 Version:        0.4.9
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Valknut is a QT Direct Connect client
 
 Group:          Applications/Internet
@@ -10,6 +10,9 @@ Source0:        http://dl.sourceforge.net/wxdcgui/%{name}-%{version}.tar.bz2
 Source1:        http://dl.sourceforge.net/wxdcgui/%{name}-%{version}-oxygen-icons.tar.gz
 Source2:        http://dl.sourceforge.net/wxdcgui/%{name}-%{version}-gnome-icons.tar.gz
 Source3:        valknut.desktop
+# Patch to build with gcc 4.7, filed into upstream bugtracker as:
+# https://sourceforge.net/tracker/?func=detail&aid=3477008&group_id=181579&atid=897767
+Patch0:         valknut-gcc4.7.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  dclib-devel >= 0.3.23
@@ -24,6 +27,7 @@ derivatives. Valknut also interoperates with all common DC hub software.
 
 %prep
 %setup -q
+%patch0
 
 %build
 %configure --enable-mt
@@ -64,6 +68,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/valknut.1.gz
 
 %changelog
+* Fri Jan 20 2012 Miloš Jakubíček <xjakub at fi.muni.cz> - 0.4.9-6
+- Fix building with gcc 4.7 (added valknut-gcc4.7.patch)
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.4.9-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list