Patch invalid code to build with GCC 7

This commit is contained in:
Jonathan Wakely 2017-02-16 12:14:00 +00:00
parent 2a2b45ad33
commit c2b44503a2
2 changed files with 26 additions and 0 deletions

20
libffado-derefptr.patch Normal file
View File

@ -0,0 +1,20 @@
--- libffado-2.3.0/src/libieee1394/configrom.cpp.derefptr 2017-02-16 12:03:33.894937836 +0000
+++ libffado-2.3.0/src/libieee1394/configrom.cpp 2017-02-16 12:03:44.000947451 +0000
@@ -176,7 +176,7 @@
( void* )CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA( m_vendorNameKv ),
len );
- while ((buf + len - 1) == '\0') {
+ while (*(buf + len - 1) == '\0') {
len--;
}
// \todo XXX seems a bit strage to do this but the nodemgr.c code does
@@ -195,7 +195,7 @@
memcpy( buf,
( void* )CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA( m_modelNameKv ),
len );
- while ((buf + len - 1) == '\0') {
+ while (*(buf + len - 1) == '\0') {
len--;
}
// \todo XXX for edirol fa-66 it seems somehow broken. see above

View File

@ -16,6 +16,8 @@ Source9: libffado-snapshot.sh
# http://subversion.ffado.org/ticket/293 # http://subversion.ffado.org/ticket/293
Patch0: libffado-api-doc-only.patch Patch0: libffado-api-doc-only.patch
Patch2: libffado-gcc6.patch Patch2: libffado-gcc6.patch
# http://subversion.ffado.org/changeset/2673
Patch3: libffado-derefptr.patch
BuildRequires: alsa-lib-devel BuildRequires: alsa-lib-devel
BuildRequires: dbus-c++-devel BuildRequires: dbus-c++-devel
@ -71,6 +73,7 @@ Applications and utilities for use with libffado.
%setup -q %setup -q
%patch0 -p1 -b .api.doc.only %patch0 -p1 -b .api.doc.only
%patch2 -p1 -b .gcc6 %patch2 -p1 -b .gcc6
%patch3 -p1 -b .derefptr
# We don't want to install all tests # We don't want to install all tests
sed -i '/Install/d' tests/{,*/}SConscript sed -i '/Install/d' tests/{,*/}SConscript
@ -141,6 +144,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog %changelog
* Thu Feb 16 2017 Jonathan Wakely <jwakely@redhat.com> - 2.3.0-2
- Patch invalid code to build with GCC 7
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-2 * Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild