[matahari] Fix build with latest gcc

Zane Bitter zaneb at fedoraproject.org
Mon Jan 9 13:16:53 UTC 2012


commit 25cc8ff51e5d220ca144c8be75c33048120b46c1
Author: Zane Bitter <zbitter at redhat.com>
Date:   Mon Jan 9 14:04:35 2012 +0100

    Fix build with latest gcc
    
    Signed-off-by: Zane Bitter <zbitter at redhat.com>

 matahari.spec        |    4 +++-
 unistd-include.patch |   20 ++++++++++++++++++++
 2 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/matahari.spec b/matahari.spec
index 2bd5b69..ae50825 100644
--- a/matahari.spec
+++ b/matahari.spec
@@ -28,6 +28,7 @@ Summary:        Matahari QMF Agents for Linux guests
 Group:          Applications/System
 License:        GPLv2
 URL:            http://matahariproject.org
+Patch0:         unistd-include.patch
 
 # wget --no-check-certificate -O matahari-matahari-{upstream_version}.tgz https://github.com/matahari/matahari/tarball/{upstream_version}
 Source0:        matahari-%{version}.tar.gz
@@ -276,6 +277,7 @@ QMF console for monitoring various agents
 
 %prep
 %setup -q -n matahari-%{version}
+%patch0 -p1 -b .unistd-include
 
 %build
 %{cmake} -DCMAKE_BUILD_TYPE=RelWithDebInfo %{!?with_qmf: -DWITH-QMF:BOOL=OFF} %{!?with_dbus: -DWITH-DBUS:BOOL=OFF} -Dinitdir=%{_initddir} -Dsysconfdir=%{_sysconfdir} .
@@ -769,7 +771,7 @@ test "x%{buildroot}" != "x" && rm -rf %{buildroot}
 %endif
 
 %changelog
-* Thu Jan 5  2012 Zane Bitter <zbitter at redhat.com> 0.6.0-2
+* Mon Jan 9  2012 Zane Bitter <zbitter at redhat.com> 0.6.0-2
 - Include shell in main package install
 - Rebuild for gcc 4.7
 
diff --git a/unistd-include.patch b/unistd-include.patch
new file mode 100644
index 0000000..c39d50d
--- /dev/null
+++ b/unistd-include.patch
@@ -0,0 +1,20 @@
+commit 638f6f90adc93c6824cd08131582f131cfb6cb78
+Author: Zane Bitter <zbitter at redhat.com>
+Date:   Mon Jan 9 13:59:17 2012 +0100
+
+    Core: Add missing header include
+    
+    Signed-off-by: Zane Bitter <zbitter at redhat.com>
+
+diff --git a/src/lib/mh_agent.cpp b/src/lib/mh_agent.cpp
+index 34799fe..5138f25 100644
+--- a/src/lib/mh_agent.cpp
++++ b/src/lib/mh_agent.cpp
+@@ -48,6 +48,7 @@
+ #include "matahari/utilities.h"
+ 
+ #ifndef WIN32
++#include <unistd.h>
+ extern "C" {
+ #include <sys/socket.h>
+ #include <netdb.h>


More information about the scm-commits mailing list