summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-support/memcached/memcached/0001-Replace-sigignore-with-signal-API.patch74
-rw-r--r--meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch15
-rw-r--r--meta-networking/recipes-support/memcached/memcached_1.6.6.bb (renamed from meta-networking/recipes-support/memcached/memcached_1.5.20.bb)4
3 files changed, 81 insertions, 12 deletions
diff --git a/meta-networking/recipes-support/memcached/memcached/0001-Replace-sigignore-with-signal-API.patch b/meta-networking/recipes-support/memcached/memcached/0001-Replace-sigignore-with-signal-API.patch
new file mode 100644
index 0000000000..e4aa8fda32
--- /dev/null
+++ b/meta-networking/recipes-support/memcached/memcached/0001-Replace-sigignore-with-signal-API.patch
@@ -0,0 +1,74 @@
1From b9040acdba1245f8cdf5e94384830e3d04fde98a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 22 Jul 2020 21:32:14 -0700
4Subject: [PATCH] Replace sigignore with signal API
5
6sigignore has been deprecated in glibc 2.32+ [1] and eventually it will be
7removed, therefore substitute it
8
9[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=02802fafcf6e11ea3f998f685035ffe568dfddeb
10
11Upstream-Status: Submitted [https://github.com/memcached/memcached/pull/702]
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 configure.ac | 1 -
16 memcached.c | 16 ++--------------
17 2 files changed, 2 insertions(+), 15 deletions(-)
18
19diff --git a/configure.ac b/configure.ac
20index ffc98b2..4567b30 100644
21--- a/configure.ac
22+++ b/configure.ac
23@@ -630,7 +630,6 @@ AC_CHECK_FUNCS(mlockall)
24 AC_CHECK_FUNCS(getpagesizes)
25 AC_CHECK_FUNCS(sysconf)
26 AC_CHECK_FUNCS(memcntl)
27-AC_CHECK_FUNCS(sigignore)
28 AC_CHECK_FUNCS(clock_gettime)
29 AC_CHECK_FUNCS(preadv)
30 AC_CHECK_FUNCS(pread)
31diff --git a/memcached.c b/memcached.c
32index 9cb778d..91ced9e 100644
33--- a/memcached.c
34+++ b/memcached.c
35@@ -8292,18 +8292,6 @@ static void sig_usrhandler(const int sig) {
36 stop_main_loop = GRACE_STOP;
37 }
38
39-#ifndef HAVE_SIGIGNORE
40-static int sigignore(int sig) {
41- struct sigaction sa = { .sa_handler = SIG_IGN, .sa_flags = 0 };
42-
43- if (sigemptyset(&sa.sa_mask) == -1 || sigaction(sig, &sa, 0) == -1) {
44- return -1;
45- }
46- return 0;
47-}
48-#endif
49-
50-
51 /*
52 * On systems that supports multiple page sizes we may reduce the
53 * number of TLB-misses by using the biggest available page size
54@@ -9996,7 +9984,7 @@ int main (int argc, char **argv) {
55 /* daemonize if requested */
56 /* if we want to ensure our ability to dump core, don't chdir to / */
57 if (do_daemonize) {
58- if (sigignore(SIGHUP) == -1) {
59+ if (signal(SIGHUP, SIG_IGN) == SIG_ERR) {
60 perror("Failed to ignore SIGHUP");
61 }
62 if (daemonize(maxcore, settings.verbose) == -1) {
63@@ -10146,7 +10134,7 @@ int main (int argc, char **argv) {
64 * ignore SIGPIPE signals; we can use errno == EPIPE if we
65 * need that information
66 */
67- if (sigignore(SIGPIPE) == -1) {
68+ if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
69 perror("failed to ignore SIGPIPE; sigaction");
70 exit(EX_OSERR);
71 }
72--
732.27.0
74
diff --git a/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch b/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch
index 544b840fea..45428ed234 100644
--- a/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch
+++ b/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch
@@ -9,24 +9,19 @@ Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
9 configure.ac | 7 ++++++- 9 configure.ac | 7 ++++++-
10 1 file changed, 6 insertions(+), 1 deletion(-) 10 1 file changed, 6 insertions(+), 1 deletion(-)
11 11
12diff --git a/configure.ac b/configure.ac
13index 7f22f21..21691b9 100644
14--- a/configure.ac 12--- a/configure.ac
15+++ b/configure.ac 13+++ b/configure.ac
16@@ -314,7 +314,12 @@ fi 14@@ -488,8 +488,12 @@ if test "x$enable_static" = "xyes"; then
17 dnl ---------------------------------------------------------------------------- 15 fi
18 16
19 AC_SEARCH_LIBS(umem_cache_create, umem) 17 dnl ----------------------------------------------------------------------------
20-AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs)
21+AC_ARG_ENABLE(hugetlbfs, 18+AC_ARG_ENABLE(hugetlbfs,
22+ [AS_HELP_STRING([--enable-hugetlbfs],[Enable hugetlbfs])]) 19+ [AS_HELP_STRING([--enable-hugetlbfs],[Enable hugetlbfs])])
23+ 20
21-AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs)
24+if test "x$enable_hugetlbfs" = "xyes"; then 22+if test "x$enable_hugetlbfs" = "xyes"; then
25+ AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs) 23+ AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs)
26+fi 24+fi
27 25
28 AC_HEADER_STDBOOL 26 AC_HEADER_STDBOOL
29 AH_BOTTOM([#if HAVE_STDBOOL_H 27 AH_BOTTOM([#if HAVE_STDBOOL_H
30--
311.8.3.4
32
diff --git a/meta-networking/recipes-support/memcached/memcached_1.5.20.bb b/meta-networking/recipes-support/memcached/memcached_1.6.6.bb
index feb4f3f14c..2eb24db9a8 100644
--- a/meta-networking/recipes-support/memcached/memcached_1.5.20.bb
+++ b/meta-networking/recipes-support/memcached/memcached_1.6.6.bb
@@ -21,9 +21,9 @@ RDEPENDS_${PN} += "perl perl-module-posix perl-module-autoloader \
21 21
22SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \ 22SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \
23 file://memcached-add-hugetlbfs-check.patch \ 23 file://memcached-add-hugetlbfs-check.patch \
24 file://0001-Replace-sigignore-with-signal-API.patch \
24 " 25 "
25SRC_URI[md5sum] = "4b64296ea0eeccdee9168c035e0488ab" 26SRC_URI[sha256sum] = "908f0eecfa559129c9e44edc46f02e73afe8faca355b4efc5c86d902fc3e32f7"
26SRC_URI[sha256sum] = "cfd7b023a9cefe7ae8a67184f51d841dbbf97994ed0e8a55e31ee092320ea1e4"
27 27
28# set the same COMPATIBLE_HOST as libhugetlbfs 28# set the same COMPATIBLE_HOST as libhugetlbfs
29COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*" 29COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"