summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2020-12-26 10:57:54 +0100
committerRobby Workman <rworkman@slackbuilds.org>2021-04-17 23:39:40 -0500
commit2684f551cb01fbeab5bc188de59b629e0b024b5b (patch)
tree7adc8ce32dfe8a66e8219538d8ea38e196a7102e
parenta9113461dd15e9d9efcfbbc97cef688c70ed5cb0 (diff)
downloadslackbuilds-2684f551cb01fbeab5bc188de59b629e0b024b5b.tar.gz
libraries/libmemcached: Patch for recent gccs.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--libraries/libmemcached/libmemcached.SlackBuild2
-rw-r--r--libraries/libmemcached/patches/libmemcached-build.patch60
2 files changed, 62 insertions, 0 deletions
diff --git a/libraries/libmemcached/libmemcached.SlackBuild b/libraries/libmemcached/libmemcached.SlackBuild
index 3cc3e35ca1..1a08cb6a2f 100644
--- a/libraries/libmemcached/libmemcached.SlackBuild
+++ b/libraries/libmemcached/libmemcached.SlackBuild
@@ -80,6 +80,8 @@ export PATH="/usr/libexec:$PATH"
# Fix bug: https://bugzilla.redhat.com/show_bug.cgi?id=1037707
patch -p1 < $CWD/patches/libmemcached-fix-linking-with-libpthread.patch
+# https://bugs.launchpad.net/libmemcached/+bug/1663985 + fix for gcc >= 10.x
+patch -p1 < $CWD/patches/libmemcached-build.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libmemcached/patches/libmemcached-build.patch b/libraries/libmemcached/patches/libmemcached-build.patch
new file mode 100644
index 0000000000..fcbe2fe31a
--- /dev/null
+++ b/libraries/libmemcached/patches/libmemcached-build.patch
@@ -0,0 +1,60 @@
+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 -up ./clients/memaslap.c.old ./clients/memaslap.c
+--- ./clients/memaslap.c.old 2020-02-04 14:11:45.029205068 +0100
++++ ./clients/memaslap.c 2020-02-04 14:12:05.409115227 +0100
+@@ -32,6 +32,15 @@
+ #include "ms_setting.h"
+ #include "ms_thread.h"
+
++/* global structure */
++ms_global_t ms_global;
++
++/* global stats information structure */
++ms_stats_t ms_stats;
++
++/* global statistic structure */
++ms_statistic_t ms_statistic;
++
+ #define PROGRAM_NAME "memslap"
+ #define PROGRAM_DESCRIPTION \
+ "Generates workload against memcached servers."
+diff -up ./clients/ms_memslap.h.old ./clients/ms_memslap.h
+--- ./clients/ms_memslap.h.old 2020-02-04 14:11:50.072182835 +0100
++++ ./clients/ms_memslap.h 2020-02-04 14:12:13.268080586 +0100
+@@ -117,13 +117,13 @@ typedef struct global
+ } ms_global_t;
+
+ /* global structure */
+-ms_global_t ms_global;
++extern ms_global_t ms_global;
+
+ /* global stats information structure */
+-ms_stats_t ms_stats;
++extern ms_stats_t ms_stats;
+
+ /* global statistic structure */
+-ms_statistic_t ms_statistic;
++extern ms_statistic_t ms_statistic;
+
+ #ifdef __cplusplus
+ }