[ice] add ice-3.4.2-gcc47 patch to fix FTFBFS with GCC 4.7

Haïkel Guémar hguemar at fedoraproject.org
Fri Jan 20 19:27:59 UTC 2012


commit 7e646cf71b7feb4854ab32b74f48772ddc6fa79a
Author: Haïkel Guémar <hguemar at fedoraproject.org>
Date:   Fri Jan 20 00:17:31 2012 +0100

    add ice-3.4.2-gcc47 patch to fix FTFBFS with GCC 4.7

 ice-3.4.2-gcc47.patch |   29 +++++++++++++++++++++++++++++
 ice.spec              |    4 +++-
 2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/ice-3.4.2-gcc47.patch b/ice-3.4.2-gcc47.patch
new file mode 100644
index 0000000..1f5255f
--- /dev/null
+++ b/ice-3.4.2-gcc47.patch
@@ -0,0 +1,29 @@
+diff --git a/cpp/src/IceUtil/FileUtil.cpp b/cpp/src/IceUtil/FileUtil.cpp
+index 1c1b974..4f2f9c5 100644
+--- a/cpp/src/IceUtil/FileUtil.cpp
++++ b/cpp/src/IceUtil/FileUtil.cpp
+@@ -14,6 +14,11 @@
+ #include <climits>
+ #include <string.h>
+ 
++#ifdef __linux
++#  include <sys/types.h>
++#  include <unistd.h>
++#endif
++
+ #ifdef _WIN32
+ #  include <process.h>
+ #endif
+diff --git a/cpp/src/Slice/FileTracker.cpp b/cpp/src/Slice/FileTracker.cpp
+index af009fe..4ebf1ab 100644
+--- a/cpp/src/Slice/FileTracker.cpp
++++ b/cpp/src/Slice/FileTracker.cpp
+@@ -9,7 +9,7 @@
+ 
+ #include <Slice/FileTracker.h>
+ 
+-#ifdef __sun
++#if defined(__sun) || defined(__linux)
+ #   include <unistd.h>
+ #endif
+ 
diff --git a/ice.spec b/ice.spec
index 77c0511..d1ce4d1 100644
--- a/ice.spec
+++ b/ice.spec
@@ -44,6 +44,7 @@ Patch4:         ice-3.4.1-no-mono.patch
 Patch5:         ice-3.4.2-java7.patch
 # fix php 5.4 compilation (from upstream)
 Patch6:         ice-3.4.2-php54.patch
+Patch7:         ice-3.4.2-gcc47.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 # Ice doesn't officially support ppc64 at all
@@ -213,6 +214,7 @@ Tools for developing Ice applications in PHP.
 %endif
 %patch5 -p1
 %patch6 -p1 -b .php54
+%patch7 -p1
 %{__tar} xf %{SOURCE1}
 rm -f ice-3.4.2-man-pages/slice2docbook.1
 
@@ -222,7 +224,7 @@ rm -f ice-3.4.2-man-pages/slice2docbook.1
 export CLASSPATH=`build-classpath db jgoodies-forms jgoodies-looks`
 
 # Compile the main Ice runtime
-make CXXFLAGS="%{optflags} -fPIC" CFLAGS="%{optflags} -fPIC" embedded_runpath_prefix="" libsubdir=%{_lib}
+make CXXFLAGS="%{optflags} -fPIC -fpermissive" CFLAGS="%{optflags} -fPIC -fpermissive" embedded_runpath_prefix="" libsubdir=%{_lib}
 
 # Rebuild the Java ImportKey class
 pushd cpp/src/ca


More information about the scm-commits mailing list