[kdevplatform] Fix missing unistd.h include (g++ 4.7 issue)

Radek Novacek rnovacek at fedoraproject.org
Mon Jan 23 09:36:49 UTC 2012


commit 4b3534040c45bd68dc6da8a63a63a7d987883621
Author: Radek Novacek <rnovacek at redhat.com>
Date:   Mon Jan 23 10:36:41 2012 +0100

    Fix missing unistd.h include (g++ 4.7 issue)

 kdevplatform-1.2.81-fix-for-g++47.patch |   11 +++++++++++
 kdevplatform.spec                       |    6 +++++-
 2 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/kdevplatform-1.2.81-fix-for-g++47.patch b/kdevplatform-1.2.81-fix-for-g++47.patch
new file mode 100644
index 0000000..713d874
--- /dev/null
+++ b/kdevplatform-1.2.81-fix-for-g++47.patch
@@ -0,0 +1,11 @@
+diff -up kdevplatform-1.2.81/util/dbus_socket_transformer/main.cpp.fix-for-g++47 kdevplatform-1.2.81/util/dbus_socket_transformer/main.cpp
+--- kdevplatform-1.2.81/util/dbus_socket_transformer/main.cpp.fix-for-g++47	2012-01-23 10:31:28.211149022 +0100
++++ kdevplatform-1.2.81/util/dbus_socket_transformer/main.cpp	2012-01-23 10:31:53.265869002 +0100
+@@ -29,6 +29,7 @@
+ #include <cerrno>
+ #include <assert.h>
+ #include <sstream>
++#include <unistd.h>
+ 
+ #ifndef HAVE_MSG_NOSIGNAL
+ #define MSG_NOSIGNAL 0
diff --git a/kdevplatform.spec b/kdevplatform.spec
index 53424d4..aa96ed5 100644
--- a/kdevplatform.spec
+++ b/kdevplatform.spec
@@ -11,6 +11,8 @@ Source0:        ftp://ftp.kde.org/pub/kde/stable/kdevelop/4.2.3/src/kdevplatform
 
 # remove set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) line
 Patch0:         kdevplatform-1.2.3-no-rpath.patch
+# Fix build failure with g++ 4.7 (missing unistd.h include)
+Patch1:         kdevplatform-1.2.81-fix-for-g++47.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -21,7 +23,7 @@ BuildRequires:  kdelibs4-devel
 BuildRequires:  kdesdk-devel >= 4.4
 BuildRequires:  pcre-devel
 BuildRequires:  subversion-devel
-BuildRequires:	qjson-devel
+BuildRequires:  qjson-devel
 
 Requires: %{name}-libs%{?_isa} = %{version}-%{release}
 Requires: kate-part%{?_kde4_version: >= %{_kde4_version}}
@@ -54,6 +56,7 @@ Requires: subversion-devel
 %prep
 %setup -q -n kdevplatform-%{version}
 %patch0 -p1 -b .no-rpath
+%patch1 -p1 -b .fix-for-g++47
 
 
 %build
@@ -117,6 +120,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
 %changelog
 * Mon Jan 23 2012 Radek Novacek <rnovacek at redhat.com> 1.2.81-1
 - Update to 1.2.81 (1.3 beta)
+- Fix missing unistd.h include (g++ 4.7 issue)
 
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.3-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild


More information about the scm-commits mailing list