[zorba] add missing include to fix failed gcc 4.7.x builds
Martin Gieseking
mgieseki at fedoraproject.org
Wed Jan 4 19:42:22 UTC 2012
commit 5b383b715a3a9fd4f7bf243d716a99ff2600d157
Author: Martin Gieseking <martin.gieseking at uos.de>
Date: Wed Jan 4 20:40:25 2012 +0100
add missing include to fix failed gcc 4.7.x builds
zorba-2.1.0-unistd.patch | 12 ++++++++++++
zorba.spec | 10 +++++++++-
2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/zorba-2.1.0-unistd.patch b/zorba-2.1.0-unistd.patch
new file mode 100644
index 0000000..1e68c43
--- /dev/null
+++ b/zorba-2.1.0-unistd.patch
@@ -0,0 +1,12 @@
+diff --git a/test/unit/datetime.cpp b/test/unit/datetime.cpp
+--- a/test/unit/datetime.cpp
++++ b/test/unit/datetime.cpp
+@@ -21,6 +21,8 @@
+ #ifdef WIN32
+ # include <windows.h>
+ # define sleep(s) Sleep(s*1000)
++#else
++# include <unistd.h>
+ #endif
+
+ #include <zorba/store_manager.h>
diff --git a/zorba.spec b/zorba.spec
index d043ec0..db28033 100644
--- a/zorba.spec
+++ b/zorba.spec
@@ -13,7 +13,7 @@
Name: zorba
Version: 2.1.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: General purpose XQuery processor implemented in C++
Group: System Environment/Libraries
@@ -25,6 +25,10 @@ License: ASL 2.0 and BSD and W3C and LGPLv2
URL: http://www.zorba-xquery.com
Source0: http://launchpad.net/zorba/trunk/2.0/+download/%{name}-%{version}.tar.gz
+# add missing includes of unistd.h required for gcc 4.7
+# https://bugs.launchpad.net/zorba/+bug/911956
+Patch0: %{name}-%{version}-unistd.patch
+
BuildRequires: bison
BuildRequires: boost-devel
BuildRequires: chrpath
@@ -126,6 +130,7 @@ the programming APIs.
%prep
%setup -q
+%patch0 -p1
# xqc.h is provided by xqc package
rm -f src/include/xqc.h
@@ -229,6 +234,9 @@ rm -f doc.tmp/*.txt
%changelog
+* Wed Jan 04 2012 Martin Gieseking <martin.gieseking at uos.de> 2.1.0-2
+- added missing #include <unistd.h> to successfully build the package with gcc 4.7.x
+
* Sat Dec 10 2011 Martin Gieseking <martin.gieseking at uos.de> 2.1.0-1
- updated to new upstream release
More information about the scm-commits
mailing list