[libffado] gcc-4.7 compile fix

Orcan Ogetbil oget at fedoraproject.org
Wed Jan 11 04:42:29 UTC 2012


commit a7929d2706e82d5e855db85b06ff501a8e20dc77
Author: Orcan Ogetbil <oget.fedora at gmail.com>
Date:   Tue Jan 10 23:42:25 2012 -0500

    gcc-4.7 compile fix

 libffado-gcc47.patch |   66 ++++++++++++++++++++++++++++++++++++++++++++++++++
 libffado.spec        |   15 ++++++-----
 2 files changed, 74 insertions(+), 7 deletions(-)
---
diff --git a/libffado-gcc47.patch b/libffado-gcc47.patch
new file mode 100644
index 0000000..426ff97
--- /dev/null
+++ b/libffado-gcc47.patch
@@ -0,0 +1,66 @@
+diff -rupN libffado-2.1.0.old/src/bebob/bebob_dl_mgr.cpp libffado-2.1.0/src/bebob/bebob_dl_mgr.cpp
+--- libffado-2.1.0.old/src/bebob/bebob_dl_mgr.cpp	2009-12-19 11:12:53.000000000 -0500
++++ libffado-2.1.0/src/bebob/bebob_dl_mgr.cpp	2012-01-10 23:30:49.727652689 -0500
+@@ -35,6 +35,7 @@
+ 
+ #include <cstdio>
+ #include <cstring>
++#include <unistd.h>
+ 
+ namespace BeBoB {
+     enum {
+diff -rupN libffado-2.1.0.old/src/ffadodevice.cpp libffado-2.1.0/src/ffadodevice.cpp
+--- libffado-2.1.0.old/src/ffadodevice.cpp	2010-01-10 15:59:02.000000000 -0500
++++ libffado-2.1.0/src/ffadodevice.cpp	2012-01-10 23:30:49.737652631 -0500
+@@ -34,6 +34,7 @@
+ 
+ #include <iostream>
+ #include <sstream>
++#include <unistd.h>
+ 
+ #include <assert.h>
+ 
+diff -rupN libffado-2.1.0.old/src/fireworks/fireworks_device.cpp libffado-2.1.0/src/fireworks/fireworks_device.cpp
+--- libffado-2.1.0.old/src/fireworks/fireworks_device.cpp	2010-10-10 13:39:07.000000000 -0400
++++ libffado-2.1.0/src/fireworks/fireworks_device.cpp	2012-01-10 23:30:49.747652573 -0500
+@@ -45,6 +45,7 @@
+ #define FIREWORKS_MIN_FIRMWARE_VERSION 0x04080000
+ 
+ #include <sstream>
++#include <unistd.h>
+ using namespace std;
+ 
+ // FireWorks is the platform used and developed by ECHO AUDIO
+diff -rupN libffado-2.1.0.old/src/libieee1394/IsoHandlerManager.cpp libffado-2.1.0/src/libieee1394/IsoHandlerManager.cpp
+--- libffado-2.1.0.old/src/libieee1394/IsoHandlerManager.cpp	2011-09-12 20:22:20.000000000 -0400
++++ libffado-2.1.0/src/libieee1394/IsoHandlerManager.cpp	2012-01-10 23:30:49.758652510 -0500
+@@ -35,6 +35,7 @@
+ #include "libutil/Configuration.h"
+ 
+ #include <cstring>
++#include <unistd.h>
+ #include <assert.h>
+ 
+ IMPL_DEBUG_MODULE( IsoHandlerManager, IsoHandlerManager, DEBUG_LEVEL_NORMAL );
+diff -rupN libffado-2.1.0.old/src/libutil/PosixSharedMemory.cpp libffado-2.1.0/src/libutil/PosixSharedMemory.cpp
+--- libffado-2.1.0.old/src/libutil/PosixSharedMemory.cpp	2008-05-15 00:38:31.000000000 -0400
++++ libffado-2.1.0/src/libutil/PosixSharedMemory.cpp	2012-01-10 23:30:49.767652458 -0500
+@@ -26,6 +26,7 @@
+ #include <sys/mman.h>
+ #include <errno.h>
+ #include <string.h>
++#include <unistd.h>
+ #include <fcntl.h>
+ 
+ namespace Util {
+diff -rupN libffado-2.1.0.old/support/dbus/test-dbus.cpp libffado-2.1.0/support/dbus/test-dbus.cpp
+--- libffado-2.1.0.old/support/dbus/test-dbus.cpp	2008-04-26 13:30:41.000000000 -0400
++++ libffado-2.1.0/support/dbus/test-dbus.cpp	2012-01-10 23:30:49.776652406 -0500
+@@ -24,6 +24,7 @@
+ #include <argp.h>
+ #include <stdlib.h>
+ #include <iostream>
++#include <unistd.h>
+ #include <signal.h>
+ 
+ #include "controlclient.h"
diff --git a/libffado.spec b/libffado.spec
index ab735b1..ee3e051 100644
--- a/libffado.spec
+++ b/libffado.spec
@@ -5,7 +5,7 @@
 Summary:        Free firewire audio driver library
 Name:           libffado
 Version:        2.1.0
-Release:        0.4.20111030.svn2000%{?dist}
+Release:        0.5.20111030.svn2000%{?dist}
 # src/libutil/float_cast.h is LGPLv2+.
 # The rest is (GPLv2 or GPLv3)
 License:        LGPLv2+ and (GPLv2 or GPLv3)
@@ -21,6 +21,9 @@ Source9:        libffado-snapshot.sh
 # We want the documentation for the library API only, not for the entire source:
 # http://subversion.ffado.org/ticket/293
 Patch0:         libffado-api-doc-only.patch
+# Fix gcc-4.7 compilation error
+# http://subversion.ffado.org/ticket/344
+Patch1:         libffado-gcc47.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  alsa-lib-devel
 BuildRequires:  dbus-c++-devel
@@ -75,6 +78,7 @@ Applications and utilities for use with libffado.
 %prep
 %setup -q
 %patch0 -p1 -b .api.doc.only
+%patch1 -p1 -b .gcc47
 
 cp -a %{SOURCE1} .
 
@@ -87,7 +91,6 @@ scons %{?_smp_mflags} \
 
 
 %install
-rm -rf %{buildroot}
 scons DESTDIR=%{buildroot} install
 
 # We need to install the xdg stuff manually
@@ -98,8 +101,6 @@ mkdir -p %{buildroot}%{_datadir}/icons/hicolor/64x64/apps
 ln -s ../../../../libffado/icons/hi64-apps-ffado.png \
     %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/ffado.png
 
-%clean
-rm -rf %{buildroot}
 
 %post -p /sbin/ldconfig
 
@@ -119,21 +120,18 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %files
-%defattr(-,root,root,-)
 %doc AUTHORS ChangeLog LICENSE.* README
 %{_libdir}/libffado.so.*
 %dir %{_datadir}/libffado/
 %{_datadir}/libffado/configuration
 
 %files devel
-%defattr(-,root,root,-)
 %doc doc/reference/html/
 %{_includedir}/libffado/
 %{_libdir}/pkgconfig/libffado.pc
 %{_libdir}/libffado.so
 
 %files -n ffado
-%defattr(-,root,root,-)
 %doc README.ffado
 %{_bindir}/*
 %{_datadir}/libffado/*.xml
@@ -145,6 +143,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{python_sitelib}/ffado/
 
 %changelog
+* Tue Jan 10 2012 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 2.1.0-0.5.20111030.svn2000
+- gcc-4.7 compile fix
+
 * Sun Oct 30 2011 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 2.1.0-0.4.20111030.svn2000
 - Update to svn2000.
 - Drop the gold linker patch. The issue is properly solved upstream. See upstream tracker #293


More information about the scm-commits mailing list