aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-07-21 23:22:47 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2017-07-25 23:45:34 +0200
commit96e67282fc7958937794d43dacaf285df5516e7c (patch)
tree7ed68d89715bc440fdf6e5e4827a4c6df7817c34
parenta65a3d97f78ca8fbff6ee39f8ee648a8d43ee13e (diff)
downloadbuildroot-96e67282fc7958937794d43dacaf285df5516e7c.tar.gz
buildroot-96e67282fc7958937794d43dacaf285df5516e7c.tar.bz2
libmemcached: fix build with gcc 7.x
This commit adds a patch to the libmemcached package that fixes the build with gcc 7.x. Since libmemcached is barely maintained upstream, the patch comes from the Fedora packages. Fixes: http://autobuild.buildroot.net/results/872b8e0e6a24cbc96e3ad9e0b8b47acdf6160ce0/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> (cherry picked from commit 8786ac28058aa553cfa8adc176952143af630af6) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--package/libmemcached/0005-fix-pointer-comparaison.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/package/libmemcached/0005-fix-pointer-comparaison.patch b/package/libmemcached/0005-fix-pointer-comparaison.patch
new file mode 100644
index 0000000000..c9f8dd19cf
--- /dev/null
+++ b/package/libmemcached/0005-fix-pointer-comparaison.patch
@@ -0,0 +1,30 @@
+Fix pointer comparaison
+
+opt_servers is a pointer, not a boolean, so testing against false to
+know if the pointer is NULL no longer works with the more strict gcc
+7.x checks.
+
+[Taken from http://pkgs.fedoraproject.org/cgit/rpms/libmemcached.git/plain/libmemcached-build.patch.]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+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);