mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-04-02 02:49:12 +00:00
memcached: Upgrade to 1.6.6
Add patch to not use deprecated sigignore API Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
7acb019200
commit
cfebe08b38
@ -0,0 +1,74 @@
|
||||
From b9040acdba1245f8cdf5e94384830e3d04fde98a Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 22 Jul 2020 21:32:14 -0700
|
||||
Subject: [PATCH] Replace sigignore with signal API
|
||||
|
||||
sigignore has been deprecated in glibc 2.32+ [1] and eventually it will be
|
||||
removed, therefore substitute it
|
||||
|
||||
[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=02802fafcf6e11ea3f998f685035ffe568dfddeb
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/memcached/memcached/pull/702]
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
configure.ac | 1 -
|
||||
memcached.c | 16 ++--------------
|
||||
2 files changed, 2 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ffc98b2..4567b30 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -630,7 +630,6 @@ AC_CHECK_FUNCS(mlockall)
|
||||
AC_CHECK_FUNCS(getpagesizes)
|
||||
AC_CHECK_FUNCS(sysconf)
|
||||
AC_CHECK_FUNCS(memcntl)
|
||||
-AC_CHECK_FUNCS(sigignore)
|
||||
AC_CHECK_FUNCS(clock_gettime)
|
||||
AC_CHECK_FUNCS(preadv)
|
||||
AC_CHECK_FUNCS(pread)
|
||||
diff --git a/memcached.c b/memcached.c
|
||||
index 9cb778d..91ced9e 100644
|
||||
--- a/memcached.c
|
||||
+++ b/memcached.c
|
||||
@@ -8292,18 +8292,6 @@ static void sig_usrhandler(const int sig) {
|
||||
stop_main_loop = GRACE_STOP;
|
||||
}
|
||||
|
||||
-#ifndef HAVE_SIGIGNORE
|
||||
-static int sigignore(int sig) {
|
||||
- struct sigaction sa = { .sa_handler = SIG_IGN, .sa_flags = 0 };
|
||||
-
|
||||
- if (sigemptyset(&sa.sa_mask) == -1 || sigaction(sig, &sa, 0) == -1) {
|
||||
- return -1;
|
||||
- }
|
||||
- return 0;
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
-
|
||||
/*
|
||||
* On systems that supports multiple page sizes we may reduce the
|
||||
* number of TLB-misses by using the biggest available page size
|
||||
@@ -9996,7 +9984,7 @@ int main (int argc, char **argv) {
|
||||
/* daemonize if requested */
|
||||
/* if we want to ensure our ability to dump core, don't chdir to / */
|
||||
if (do_daemonize) {
|
||||
- if (sigignore(SIGHUP) == -1) {
|
||||
+ if (signal(SIGHUP, SIG_IGN) == SIG_ERR) {
|
||||
perror("Failed to ignore SIGHUP");
|
||||
}
|
||||
if (daemonize(maxcore, settings.verbose) == -1) {
|
||||
@@ -10146,7 +10134,7 @@ int main (int argc, char **argv) {
|
||||
* ignore SIGPIPE signals; we can use errno == EPIPE if we
|
||||
* need that information
|
||||
*/
|
||||
- if (sigignore(SIGPIPE) == -1) {
|
||||
+ if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
|
||||
perror("failed to ignore SIGPIPE; sigaction");
|
||||
exit(EX_OSERR);
|
||||
}
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -9,24 +9,19 @@ Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
|
||||
configure.ac | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 7f22f21..21691b9 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -314,7 +314,12 @@ fi
|
||||
dnl ----------------------------------------------------------------------------
|
||||
@@ -488,8 +488,12 @@ if test "x$enable_static" = "xyes"; then
|
||||
fi
|
||||
|
||||
AC_SEARCH_LIBS(umem_cache_create, umem)
|
||||
-AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs)
|
||||
dnl ----------------------------------------------------------------------------
|
||||
+AC_ARG_ENABLE(hugetlbfs,
|
||||
+ [AS_HELP_STRING([--enable-hugetlbfs],[Enable hugetlbfs])])
|
||||
+
|
||||
|
||||
-AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs)
|
||||
+if test "x$enable_hugetlbfs" = "xyes"; then
|
||||
+ AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs)
|
||||
+fi
|
||||
|
||||
AC_HEADER_STDBOOL
|
||||
AH_BOTTOM([#if HAVE_STDBOOL_H
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
@ -21,9 +21,9 @@ RDEPENDS_${PN} += "perl perl-module-posix perl-module-autoloader \
|
||||
|
||||
SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \
|
||||
file://memcached-add-hugetlbfs-check.patch \
|
||||
file://0001-Replace-sigignore-with-signal-API.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "4b64296ea0eeccdee9168c035e0488ab"
|
||||
SRC_URI[sha256sum] = "cfd7b023a9cefe7ae8a67184f51d841dbbf97994ed0e8a55e31ee092320ea1e4"
|
||||
SRC_URI[sha256sum] = "908f0eecfa559129c9e44edc46f02e73afe8faca355b4efc5c86d902fc3e32f7"
|
||||
|
||||
# set the same COMPATIBLE_HOST as libhugetlbfs
|
||||
COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
|
||||
Loading…
x
Reference in New Issue
Block a user