diff --git a/libmemcached-1.0.18-fix-build-gcc7.patch b/libmemcached-1.0.18-fix-build-gcc7.patch new file mode 100644 index 0000000..21e5fca --- /dev/null +++ b/libmemcached-1.0.18-fix-build-gcc7.patch @@ -0,0 +1,21 @@ +diff -up ./clients/memflush.cc.old ./clients/memflush.cc +--- ./clients/memflush.cc.old 2017-02-12 10:12:59.615209225 +0100 ++++ ./clients/memflush.cc 2017-02-12 10:13:39.998382783 +0100 +@@ -39,7 +39,7 @@ int main(int argc, char *argv[]) + { + options_parse(argc, argv); + +- if (opt_servers == false) ++ if (!opt_servers) + { + char *temp; + +@@ -48,7 +48,7 @@ int main(int argc, char *argv[]) + opt_servers= strdup(temp); + } + +- if (opt_servers == false) ++ if (!opt_servers) + { + std::cerr << "No Servers provided" << std::endl; + exit(EXIT_FAILURE); diff --git a/libmemcached.changes b/libmemcached.changes index 8220923..201d5f8 100644 --- a/libmemcached.changes +++ b/libmemcached.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jun 22 16:51:01 UTC 2017 - antoine.belvire@opensuse.org + +- Add libmemcached-1.0.18-fix-build-gcc7.patch: Fix build with GCC + 7, picked from Fedora (boo#1041295). + ------------------------------------------------------------------- Wed May 11 14:53:53 UTC 2016 - kstreitova@suse.com diff --git a/libmemcached.spec b/libmemcached.spec index f619737..f0f39a6 100644 --- a/libmemcached.spec +++ b/libmemcached.spec @@ -1,7 +1,7 @@ # # spec file for package libmemcached # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -32,6 +32,8 @@ Patch0: libmemcached-pthread.patch Patch1: libmemcached-automake1_14.diff # PATCH-FIX-UPSTREAM libmemcached-no-docs-available.patch dimstar@opensuse.org -- Do not build docs if not VCS checkout Patch2: libmemcached-no-docs-available.patch +# PATCH-FIX-UPSTREAM libmemcached-1.0.18-fix-build-gcc7.patch -- Fix build with GCC 7 +Patch3: libmemcached-1.0.18-fix-build-gcc7.patch # List of additional build dependencies BuildRequires: automake >= 1.13 BuildRequires: bison @@ -91,6 +93,7 @@ usage, thread safe, and provide full access to server side methods. %setup -q %patch -P 0 -P 1 -p1 %patch2 -p1 +%patch3 -p1 %build autoreconf -fiv