Replace patch from openSUSE by the Debian one to not only build kyotocabinet with GCC >= 6 but also with GCC >= 7 (#1307706 #c15)

This commit is contained in:
Robert Scheck 2017-02-12 16:02:08 +01:00
parent 2ef6cad773
commit 1e16abdf7f
3 changed files with 27 additions and 5 deletions

View File

@ -1,4 +1,5 @@
Patch from openSUSE to work around build failures with GCC >= 6 like:
Patch from Andreas Stührk <andy@hammerhartes.de> 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*)':
@ -11,10 +12,25 @@ kcdbext.h:1281:14: error: cannot convert 'bool' to 'char*' in return
return false;
^~~~~
Note that using '\0' rather nullptr (like the patch from openSUSE is
doing) just leads to new build failures with GCC >= 7 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: invalid conversion from 'char' to 'char*' [-fpermissive]
return '\0';
^~~~
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: invalid conversion from 'char' to 'char*' [-fpermissive]
return '\0';
^~~~
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
- https://bugs.debian.org/811627
--- 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
@ -23,7 +39,7 @@ See also:
set_error(_KCCODELINE_, BasicDB::Error::INVALID, "not opened");
*sp = 0;
- return false;
+ return '\0';
+ return nullptr;
}
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: 12%{?dist}
Release: 13%{?dist}
License: GPLv3
Group: Applications/Databases
URL: http://fallabs.com/%{name}/
@ -135,7 +135,9 @@ rm -rf $RPM_BUILD_ROOT
%files libs
%defattr(-,root,root,-)
%doc ChangeLog COPYING FOSSEXCEPTION LINKEXCEPTION
%{!?_licensedir:%global license %%doc}
%license COPYING FOSSEXCEPTION LINKEXCEPTION
%doc ChangeLog
%{_libdir}/libkyotocabinet.so.*
%files devel
@ -170,6 +172,10 @@ rm -rf $RPM_BUILD_ROOT
%doc COPYING doc/api/* kyotocabinet.idl
%changelog
* Sun Feb 12 2017 Robert Scheck <robert@fedoraproject.org> 1.2.76-13
- Replace patch from openSUSE by the Debian one to not only build
kyotocabinet with GCC >= 6 but also with GCC >= 7 (#1307706 #c15)
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.76-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

View File

@ -1 +1 @@
b925d369d7ed4a37cf0013409046738c kyotocabinet-1.2.76.tar.gz
SHA512 (kyotocabinet-1.2.76.tar.gz) = 278db7b327eb4c21bf0137d9aa14fb67d74d5ce7ed1cb29fc9120d157a60de165ec0cf842903eb7952e8f998045ae585b958977fa973ba0e0773381de71d9f6a