Added patch from openSUSE to build with GCC >= 6 (#1307706)

This commit is contained in:
Robert Scheck 2016-08-14 21:03:39 +02:00
parent 863afbdc7e
commit 988ed3a17b
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,29 @@
Patch from openSUSE to work around build failures with GCC >= 6 like:
In file included from kcdbext.cc:16:0:
kcdbext.h: In member function 'char* kyotocabinet::IndexDB::get(const char*, size_t, size_t*)':
kcdbext.h:1281:14: error: cannot convert 'bool' to 'char*' in return
return false;
^~~~~
In file included from kclangc.cc:17:0:
kcdbext.h: In member function 'char* kyotocabinet::IndexDB::get(const char*, size_t, size_t*)':
kcdbext.h:1281:14: error: cannot convert 'bool' to 'char*' in return
return false;
^~~~~
See also:
- https://bugzilla.redhat.com/show_bug.cgi?id=1307706
- https://build.opensuse.org/package/view_file/devel:libraries:c_c++/kyotocabinet/gcc6-fix-errors.patch?expand=1
--- kyotocabinet-1.2.76/kcdbext.h 2016-05-25 11:32:53.591866016 +0200
+++ kyotocabinet-1.2.76/kcdbext.h 2012-05-24 18:27:59.000000000 +0200
@@ -1278,7 +1278,7 @@
if (omode_ == 0) {
set_error(_KCCODELINE_, BasicDB::Error::INVALID, "not opened");
*sp = 0;
- return false;
+ return '\0';
}
if (!cache_) return db_.get(kbuf, ksiz, sp);
size_t dvsiz = 0;

View File

@ -1,7 +1,7 @@
Summary: A straightforward implementation of DBM
Name: kyotocabinet
Version: 1.2.76
Release: 10%{?dist}
Release: 11%{?dist}
License: GPLv3
Group: Applications/Databases
URL: http://fallabs.com/%{name}/
@ -9,6 +9,7 @@ Source: http://fallabs.com/%{name}/pkg/%{name}-%{version}.tar.gz
Patch0: kyotocabinet-1.2.76-cflags.patch
Patch1: kyotocabinet-1.2.76-8-byte-atomics.patch
Patch2: kyotocabinet-1.2.76-tr1_hashtable.patch
Patch3: kyotocabinet-1.2.76-gcc6.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
BuildRequires: zlib-devel, lzo-devel, xz-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -62,6 +63,7 @@ applications that use Kyoto Cabinet.
%if 0%{?rhel} == 5
%patch2 -p1 -b .tr1_hashtable
%endif
%patch3 -p1 -b .gcc6
%build
%configure --disable-opt --enable-lzo --enable-lzma
@ -168,6 +170,9 @@ rm -rf $RPM_BUILD_ROOT
%doc COPYING doc/api/* kyotocabinet.idl
%changelog
* Sun Aug 14 2016 Robert Scheck <robert@fedoraproject.org> 1.2.76-11
- Added patch from openSUSE to build with GCC >= 6 (#1307706)
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.76-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild