30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
|
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;
|