Accepting request 831286 from home:gmbr3:Active
- Add use-signal-function-instead-of-sigignore.patch: sigignore causes deprecation errors(gh#memcached/memcached#691) OBS-URL: https://build.opensuse.org/request/show/831286 OBS-URL: https://build.opensuse.org/package/show/network:utilities/memcached?expand=0&rev=78
This commit is contained in:
parent
cafa0e8716
commit
ab5d33ed80
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 1 19:24:14 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>
|
||||
|
||||
- Add use-signal-function-instead-of-sigignore.patch: sigignore
|
||||
causes deprecation errors(gh#memcached/memcached#691)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jun 6 05:37:41 UTC 2020 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
|
@ -39,6 +39,8 @@ Source1: %{name}.init
|
||||
Source2: %{name}.sysconfig
|
||||
Source3: memcached-rpmlintrc
|
||||
Source4: memcached.service
|
||||
# PATCH-FIX-UPSTREAM gh#memcached/memcached#691
|
||||
Patch: use-signal-function-instead-of-sigignore.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: cyrus-sasl-devel
|
||||
@ -88,6 +90,7 @@ This package contains development files
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -p1
|
||||
|
||||
%build
|
||||
autoreconf -fi
|
||||
|
85
use-signal-function-instead-of-sigignore.patch
Normal file
85
use-signal-function-instead-of-sigignore.patch
Normal file
@ -0,0 +1,85 @@
|
||||
From c6821a866e50754181bcf14533e3d4c31be36b79 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Korbar <tkorbar@redhat.com>
|
||||
Date: Mon, 29 Jun 2020 08:56:09 +0200
|
||||
Subject: [PATCH] Use signal function instead of sigignore
|
||||
|
||||
Sigignore has been marked as deprecated on Fedora rawhide and
|
||||
signal function is used already on multiple places in memcached.c
|
||||
|
||||
fix #690
|
||||
---
|
||||
configure.ac | 5 ++---
|
||||
memcached.c | 16 ++--------------
|
||||
2 files changed, 4 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ffc98b24e..a7be211e0 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)
|
||||
@@ -779,7 +778,7 @@ if test "$ICC" = "yes"
|
||||
then
|
||||
dnl ICC trying to be gcc.
|
||||
CFLAGS="$CFLAGS -diag-disable 187 -Wall -Werror"
|
||||
- AC_DEFINE([_GNU_SOURCE],[1],[find sigignore on Linux])
|
||||
+ AC_DEFINE([_GNU_SOURCE],[1],[make sure IOV_MAX is defined])
|
||||
elif test "$GCC" = "yes"
|
||||
then
|
||||
GCC_VERSION=`$CC -dumpversion`
|
||||
@@ -792,7 +791,7 @@ then
|
||||
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||
;;
|
||||
esac
|
||||
- AC_DEFINE([_GNU_SOURCE],[1],[find sigignore on Linux])
|
||||
+ AC_DEFINE([_GNU_SOURCE],[1],[make sure IOV_MAX is defined])
|
||||
elif test "$SUNCC" = "yes"
|
||||
then
|
||||
CFLAGS="$CFLAGS -errfmt=error -errwarn -errshort=tags"
|
||||
diff --git a/memcached.c b/memcached.c
|
||||
index d796abb4b..dc67267c4 100644
|
||||
--- a/memcached.c
|
||||
+++ b/memcached.c
|
||||
@@ -8400,18 +8400,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
|
||||
@@ -10097,7 +10085,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) {
|
||||
@@ -10247,7 +10235,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);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user