[ois] Add unistd.h includes for gcc 4.7

Bruno Wolff III bruno at fedoraproject.org
Tue Jan 17 03:48:46 UTC 2012


commit 8cc9ed8a7ba9c520e660f3cb92ab61676924a720
Author: Bruno Wolff III <bruno at wolff.to>
Date:   Mon Jan 16 21:43:08 2012 -0600

    Add unistd.h includes for gcc 4.7

 ois-gcc47.patch |   39 +++++++++++++++++++++++++++++++++++++++
 ois.spec        |    3 +++
 2 files changed, 42 insertions(+), 0 deletions(-)
---
diff --git a/ois-gcc47.patch b/ois-gcc47.patch
new file mode 100644
index 0000000..85d5995
--- /dev/null
+++ b/ois-gcc47.patch
@@ -0,0 +1,39 @@
+--- demos/FFConsoleDemo.cpp.orig	2012-01-16 21:38:50.809838535 -0600
++++ demos/FFConsoleDemo.cpp	2012-01-16 21:39:14.960908011 -0600
+@@ -1,5 +1,6 @@
+ #include "OIS.h"
+ 
++#include <unistd.h>
+ #include <math.h>
+ #include <cstdlib>
+ #include <iostream>
+--- demos/OISConsole.cpp.orig	2012-01-16 21:37:36.787430668 -0600
++++ demos/OISConsole.cpp	2012-01-16 21:38:13.194057764 -0600
+@@ -9,6 +9,7 @@
+ //Advanced Usage
+ #include "OISForceFeedback.h"
+ 
++#include <unistd.h>
+ #include <iostream>
+ #include <vector>
+ #include <sstream>
+--- src/linux/LinuxJoyStickEvents.cpp.orig	2012-01-16 21:32:01.062761788 -0600
++++ src/linux/LinuxJoyStickEvents.cpp	2012-01-16 21:35:24.385603077 -0600
+@@ -30,6 +30,7 @@
+ #include "OISEvents.h"
+ #include "OISException.h"
+ 
++#include <unistd.h>
+ #include <fcntl.h>        //Needed to Open a file descriptor
+ #include <cassert>	
+ #include <linux/input.h>
+--- src/linux/LinuxForceFeedback.cpp.orig	2012-01-16 21:35:59.662086538 -0600
++++ src/linux/LinuxForceFeedback.cpp	2012-01-16 21:36:24.890292910 -0600
+@@ -23,6 +23,7 @@
+ #include "linux/LinuxForceFeedback.h"
+ #include "OISException.h"
+ 
++#include <unistd.h>
+ #include <cstdlib>
+ #include <errno.h>
+ #include <memory.h>
diff --git a/ois.spec b/ois.spec
index 39fbd68..aee1e1f 100644
--- a/ois.spec
+++ b/ois.spec
@@ -6,6 +6,7 @@ Group:          System Environment/Libraries
 License:        zlib
 URL:            http://sourceforge.net/projects/wgois
 Source0:        http://downloads.sourceforge.net/wgois/%{name}_v1-3.tar.gz
+Patch0:         ois-gcc47.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  libtool libXaw-devel
 
@@ -28,6 +29,7 @@ developing applications that use %{name}.
 
 %prep
 %setup -q -n ois-v1-3
+patch0
 chmod -x `find includes -type f` `find src -type f` ReadMe.txt
 sh bootstrap
 
@@ -69,6 +71,7 @@ rm -rf $RPM_BUILD_ROOT
 * Mon Jan 16 2012 Bruno Wolff III <bruno at wolff.to> - 1.3.0-1
 - Upstream 1.3 release. Mostly bug fixes.
 - The bootstrap file is no longer executable in the shipped source
+- Add unistd.h includes for gcc 4.7
 
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.0-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild


More information about the scm-commits mailing list