From 1ea5e7f013581bee3512b5eb0a6f810b1578d6ba Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Wed, 1 May 2019 09:57:15 +0200 Subject: 20190501.1 global branch merge. Signed-off-by: Matteo Bernardini --- system/kyotocabinet/kyotocabinet-1.2.76-gcc6.patch | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 system/kyotocabinet/kyotocabinet-1.2.76-gcc6.patch (limited to 'system/kyotocabinet/kyotocabinet-1.2.76-gcc6.patch') diff --git a/system/kyotocabinet/kyotocabinet-1.2.76-gcc6.patch b/system/kyotocabinet/kyotocabinet-1.2.76-gcc6.patch new file mode 100644 index 0000000000..d565cff0f3 --- /dev/null +++ b/system/kyotocabinet/kyotocabinet-1.2.76-gcc6.patch @@ -0,0 +1,45 @@ +Patch from Andreas Stührk 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; + ^~~~~ + +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 +@@ -1278,7 +1278,7 @@ + if (omode_ == 0) { + set_error(_KCCODELINE_, BasicDB::Error::INVALID, "not opened"); + *sp = 0; +- return false; ++ return nullptr; + } + if (!cache_) return db_.get(kbuf, ksiz, sp); + size_t dvsiz = 0; -- cgit v1.2.3