[kdegames] Fix build with g++ 4.7

Radek Novacek rnovacek at fedoraproject.org
Wed Jan 4 13:34:11 UTC 2012


commit e84128785174f7efd4a3c6e166a006d1abb31ad5
Author: Radek Novacek <rnovacek at redhat.com>
Date:   Wed Jan 4 14:33:57 2012 +0100

    Fix build with g++ 4.7

 kdegames-4.7.97-fix-for-g++47.patch |   12 ++++++++++++
 kdegames.spec                       |    5 +++++
 2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/kdegames-4.7.97-fix-for-g++47.patch b/kdegames-4.7.97-fix-for-g++47.patch
new file mode 100644
index 0000000..e9ff2e2
--- /dev/null
+++ b/kdegames-4.7.97-fix-for-g++47.patch
@@ -0,0 +1,12 @@
+diff -up kdegames-4.7.97/kblocks/KBlocksPlayNetwork.cpp.fix-for-g++47.patch kdegames-4.7.97/kblocks/KBlocksPlayNetwork.cpp
+--- kdegames-4.7.97/kblocks/KBlocksPlayNetwork.cpp.fix-for-g++47.patch	2012-01-04 14:27:28.313311063 +0100
++++ kdegames-4.7.97/kblocks/KBlocksPlayNetwork.cpp	2012-01-04 14:27:59.912084174 +0100
+@@ -9,6 +9,8 @@
+ ***************************************************************************/
+ #include "KBlocksPlayNetwork.h"
+ 
++#include <unistd.h>
++
+ #ifdef Q_OS_WIN
+ #include <windows.h>
+ #endif
diff --git a/kdegames.spec b/kdegames.spec
index 9983651..b21f87f 100644
--- a/kdegames.spec
+++ b/kdegames.spec
@@ -10,6 +10,9 @@ Group:   Amusements/Games
 Source0: ftp://ftp.kde.org/pub/kde/stable/%{version}/src/kdegames-%{version}.tar.bz2
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+# Fix building with g++4.7
+Patch0:  kdegames-4.7.97-fix-for-g++47.patch
+
 ## upstream patches
 
 # Klickety moved here from kdegames3
@@ -122,6 +125,7 @@ game applications for KDE 4.
 
 %prep
 %setup -q -n kdegames-%{version}%{?alphatag}
+%patch0 -p1 -b .fix-for-g++47.patch
 
 
 %build
@@ -500,6 +504,7 @@ rm -rf %{buildroot}
 %changelog
 * Wed Jan 04 2012 Radek Novacek <rnovacek at redhat.com> - 6:4.7.97-1
 - 4.7.97
+- Fix build with g++ 4.7
 
 * Wed Dec 21 2011 Radek Novacek <rnovacek at redhat.com> - 6:4.7.95-1
 - 4.7.95


More information about the scm-commits mailing list