[fawkes] Build fixes for gcc-4.7

rmattes rmattes at fedoraproject.org
Sun Jan 15 00:27:15 UTC 2012


commit 333a119194ad2e71cd6724b0fa2bc71e24fe1fc3
Author: Rich Mattes <richmattes at gmail.com>
Date:   Sat Jan 14 19:27:02 2012 -0500

    Build fixes for gcc-4.7

 fawkes-0.4.2-gcc47.patch |  151 ++++++++++++++++++++++++++++++++++++++++++++++
 fawkes.spec              |    5 +-
 2 files changed, 154 insertions(+), 2 deletions(-)
---
diff --git a/fawkes-0.4.2-gcc47.patch b/fawkes-0.4.2-gcc47.patch
new file mode 100644
index 0000000..37326a0
--- /dev/null
+++ b/fawkes-0.4.2-gcc47.patch
@@ -0,0 +1,151 @@
+diff -up ./src/firevision/cams/v4l2.cpp.gcc47 ./src/firevision/cams/v4l2.cpp
+--- ./src/firevision/cams/v4l2.cpp.gcc47	2012-01-14 15:43:25.272510807 -0500
++++ ./src/firevision/cams/v4l2.cpp	2012-01-14 15:43:46.245292780 -0500
+@@ -29,6 +29,7 @@
+ #include <utils/logging/liblogger.h>
+ #include <fvutils/system/camargp.h>
+ 
++#include <unistd.h>
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+diff -up ./src/firevision/fvutils/net/fuse_server_client_thread.cpp.gcc47 ./src/firevision/fvutils/net/fuse_server_client_thread.cpp
+--- ./src/firevision/fvutils/net/fuse_server_client_thread.cpp.gcc47	2012-01-14 15:28:34.450646455 -0500
++++ ./src/firevision/fvutils/net/fuse_server_client_thread.cpp	2012-01-14 15:29:00.075600517 -0500
+@@ -40,6 +40,7 @@
+ #include <netcomm/utils/exceptions.h>
+ #include <utils/logging/liblogger.h>
+ 
++#include <unistd.h>
+ #include <netinet/in.h>
+ #include <cstring>
+ #include <cstdlib>
+diff -up ./src/firevision/tools/bb2gettric.cpp.gcc47 ./src/firevision/tools/bb2gettric.cpp
+--- ./src/firevision/tools/bb2gettric.cpp.gcc47	2012-01-14 16:49:41.888778425 -0500
++++ ./src/firevision/tools/bb2gettric.cpp	2012-01-14 16:50:13.633964944 -0500
+@@ -22,6 +22,7 @@
+ 
+ #include <cams/bumblebee2.h>
+ #include <fvutils/system/camargp.h>
++#include <unistd.h>
+ #include <cerrno>
+ #include <cstdlib>
+ 
+diff -up ./src/firevision/tools/bb2rectlut.cpp.gcc47 ./src/firevision/tools/bb2rectlut.cpp
+--- ./src/firevision/tools/bb2rectlut.cpp.gcc47	2012-01-14 16:10:01.528764087 -0500
++++ ./src/firevision/tools/bb2rectlut.cpp	2012-01-14 16:10:24.539623755 -0500
+@@ -34,6 +34,7 @@
+ #include <cerrno>
+ #endif
+ 
++#include <unistd.h>
+ #include <cstdlib>
+ #include <cstdio>
+ 
+diff -up ./src/interfaces/generator/parser.cpp.gcc47 ./src/interfaces/generator/parser.cpp
+--- ./src/interfaces/generator/parser.cpp.gcc47	2012-01-14 14:59:10.178643402 -0500
++++ ./src/interfaces/generator/parser.cpp	2012-01-14 14:58:17.745693586 -0500
+@@ -273,10 +273,10 @@ InterfaceParser::printPseudoMaps(vector<
+ 	 << "  keytype=" << i->getKeyType() << endl;
+     InterfacePseudoMap::RefList &reflist = i->getRefList();
+ 
+-    InterfacePseudoMap::RefList::iterator i;
+-    for (i = reflist.begin(); i != reflist.end(); ++i) {
+-      cout << "    Ref:  field=" << i->first
+-	   << "  key=" << i->second << endl;
++    InterfacePseudoMap::RefList::iterator j;
++    for (j = reflist.begin(); j != reflist.end(); ++j) {
++      cout << "    Ref:  field=" << j->first
++	   << "  key=" << j->second << endl;
+     }
+ 
+     cout << endl;
+diff -up ./src/libs/config/net_handler.h.gcc47 ./src/libs/config/net_handler.h
+--- ./src/libs/config/net_handler.h.gcc47	2012-01-14 14:48:02.562816866 -0500
++++ ./src/libs/config/net_handler.h	2012-01-14 14:48:28.331775133 -0500
+@@ -36,6 +36,7 @@
+ #include <map>
+ #include <string>
+ #include <utility>
++#include <string.h>
+ 
+ namespace fawkes {
+ 
+diff -up ./src/libs/netcomm/utils/resolver.cpp.gcc47 ./src/libs/netcomm/utils/resolver.cpp
+--- ./src/libs/netcomm/utils/resolver.cpp.gcc47	2012-01-14 14:04:39.670060680 -0500
++++ ./src/libs/netcomm/utils/resolver.cpp	2012-01-14 14:02:07.592530756 -0500
+@@ -27,6 +27,7 @@
+ #include <core/threading/mutex_locker.h>
+ #include <utils/system/hostinfo.h>
+ 
++#include <unistd.h>
+ #include <sys/types.h>
+ #include <arpa/inet.h>
+ #include <netdb.h>
+diff -up ./src/libs/webview/file_reply.cpp.gcc47 ./src/libs/webview/file_reply.cpp
+--- ./src/libs/webview/file_reply.cpp.gcc47	2012-01-14 14:30:18.733069398 -0500
++++ ./src/libs/webview/file_reply.cpp	2012-01-14 14:30:35.017674470 -0500
+@@ -25,6 +25,7 @@
+ #include <core/exceptions/system.h>
+ #include <utils/system/filetype.h>
+ 
++#include <unistd.h>
+ #include <cerrno>
+ #include <sys/stat.h>
+ 
+diff -up ./src/mainapp/main_thread.cpp.gcc47 ./src/mainapp/main_thread.cpp
+--- ./src/mainapp/main_thread.cpp.gcc47	2012-01-14 15:08:32.969984051 -0500
++++ ./src/mainapp/main_thread.cpp	2012-01-14 15:08:52.335705041 -0500
+@@ -45,6 +45,7 @@
+ #include <plugin/loader.h>
+ #include <plugin/net/handler.h>
+ 
++#include <unistd.h>
+ #include <cstdio>
+ #include <cstring>
+ #include <cerrno>
+diff -up ./src/plugins/joystick/acquisition_thread.cpp.gcc47 ./src/plugins/joystick/acquisition_thread.cpp
+--- ./src/plugins/joystick/acquisition_thread.cpp.gcc47	2012-01-14 17:00:54.517918883 -0500
++++ ./src/plugins/joystick/acquisition_thread.cpp	2012-01-14 17:01:17.537667230 -0500
+@@ -25,6 +25,7 @@
+ #include <core/threading/mutex.h>
+ #include <core/exceptions/system.h>
+ 
++#include <unistd.h>
+ #include <algorithm>
+ #include <linux/joystick.h>
+ #include <cstdlib>
+diff -up ./src/plugins/pantilt/robotis/rx28_thread.cpp.gcc47 ./src/plugins/pantilt/robotis/rx28_thread.cpp
+--- ./src/plugins/pantilt/robotis/rx28_thread.cpp.gcc47	2012-01-14 17:51:55.380140676 -0500
++++ ./src/plugins/pantilt/robotis/rx28_thread.cpp	2012-01-14 17:52:16.941946295 -0500
+@@ -27,6 +27,7 @@
+ #include <interfaces/PanTiltInterface.h>
+ #include <interfaces/LedInterface.h>
+ 
++#include <unistd.h>
+ #include <cstdarg>
+ #include <cmath>
+ 
+diff -up ./src/plugins/pantilt/sony/visca.cpp.gcc47 ./src/plugins/pantilt/sony/visca.cpp
+diff -up ./src/plugins/worldmodel/net_thread.cpp.gcc47 ./src/plugins/worldmodel/net_thread.cpp
+--- ./src/plugins/worldmodel/net_thread.cpp.gcc47	2012-01-14 18:01:58.348407757 -0500
++++ ./src/plugins/worldmodel/net_thread.cpp	2012-01-14 18:02:12.354925697 -0500
+@@ -26,6 +26,7 @@
+ #include <interfaces/ObjectPositionInterface.h>
+ #include <interfaces/GameStateInterface.h>
+ 
++#include <unistd.h>
+ #include <string>
+ #include <cstring>
+ #include <cstdlib>
+diff -up ./src/tools/refboxrep/refbox_state_sender.cpp.gcc47 ./src/tools/refboxrep/refbox_state_sender.cpp
+--- ./src/tools/refboxrep/refbox_state_sender.cpp.gcc47	2012-01-14 18:42:46.144760473 -0500
++++ ./src/tools/refboxrep/refbox_state_sender.cpp	2012-01-14 18:42:59.792264318 -0500
+@@ -25,6 +25,7 @@
+ #include <netcomm/worldinfo/transceiver.h>
+ #include <core/macros.h>
+ 
++#include <unistd.h>
+ #include <cstdio>
+ 
+ using namespace fawkes;
diff --git a/fawkes.spec b/fawkes.spec
index 6581b39..979166a 100644
--- a/fawkes.spec
+++ b/fawkes.spec
@@ -8,7 +8,8 @@ License:        GPLv2+ and GPLv2+ with exceptions
 URL:            http://www.fawkesrobotics.org
 Source0:        http://files.fawkesrobotics.org/releases/%{name}-%{version}.tar.bz2
 Patch0:         fawkes-0.4.2-ppc64.patch
-Patch1:		fawkes-0.4.2-build-fix.patch
+Patch1:	        fawkes-0.4.2-build-fix.patch
+Patch2:         fawkes-0.4.2-gcc47.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  gcc-c++, make >= 3.81
@@ -315,7 +316,7 @@ common Lua modules.
 %setup -q
 %patch0 -p1 -b .ppc64
 %patch1 -p1 -b .build-fix
-
+%patch2 -p0 -b .gcc47
 
 %build
 make uncolored-switch-buildtype-sysinstall


More information about the scm-commits mailing list