!29 Fix compile error which report sighold is deprecated
From: @wenchao-hao Reviewed-by: @liuzhiqiang26 Signed-off-by: @liuzhiqiang26
This commit is contained in:
commit
48c714e3cf
44
0002-libisns-remove-sighold-and-sigrelse.patch
Normal file
44
0002-libisns-remove-sighold-and-sigrelse.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From e7dac76ce61039fefa58985c955afccb60dabe87 Mon Sep 17 00:00:00 2001
|
||||
From: Rosen Penev <rosenp@gmail.com>
|
||||
Date: Wed, 29 Apr 2020 15:55:55 -0700
|
||||
Subject: [PATCH] libisns: remove sighold and sigrelse
|
||||
|
||||
The man page says that these are deprecated. Use sugprocmask as a replacement.
|
||||
---
|
||||
include/libisns/util.h | 16 ++++++++++++----
|
||||
1 file changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/include/libisns/util.h b/include/libisns/util.h
|
||||
index e5ed037..f1b97f0 100644
|
||||
--- a/include/libisns/util.h
|
||||
+++ b/include/libisns/util.h
|
||||
@@ -41,14 +41,22 @@ char * print_size(unsigned long);
|
||||
*/
|
||||
static inline void signals_hold(void)
|
||||
{
|
||||
- sighold(SIGTERM);
|
||||
- sighold(SIGINT);
|
||||
+ sigset_t s;
|
||||
+
|
||||
+ sigemptyset(&s);
|
||||
+ sigaddset(&s, SIGTERM);
|
||||
+ sigaddset(&s, SIGINT);
|
||||
+ sigprocmask(SIG_BLOCK, &s, 0);
|
||||
}
|
||||
|
||||
static inline void signals_release(void)
|
||||
{
|
||||
- sigrelse(SIGTERM);
|
||||
- sigrelse(SIGINT);
|
||||
+ sigset_t s;
|
||||
+
|
||||
+ sigemptyset(&s);
|
||||
+ sigaddset(&s, SIGTERM);
|
||||
+ sigaddset(&s, SIGINT);
|
||||
+ sigprocmask(SIG_UNBLOCK, &s, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
Name: open-isns
|
||||
Version: 0.100
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: The iSNS server and client programs
|
||||
License: LGPLv2+
|
||||
URL: https://www.github.com/open-iscsi/open-isns
|
||||
Source0: https://www.github.com/open-iscsi/open-isns/archive/v%{version}.tar.gz#/open-isns-%{version}.tar.gz
|
||||
Patch0001: Fix-the-issue-of-ignoring-the-return-value.patch
|
||||
Patch0002: 0001-Do-not-install-isnsd.socket-in-isnsd.service.patch
|
||||
Patch0003: 0002-libisns-remove-sighold-and-sigrelse.patch
|
||||
BuildRequires: gcc git systemd automake autoconf make
|
||||
BuildRequires: openssl-devel systemd-devel
|
||||
Recommends: %{name}-help = %{version}-%{release}
|
||||
@ -91,6 +92,9 @@ install -p -m 644 isnsd.service %{buildroot}%{_unitdir}/isnsd.service
|
||||
%{_mandir}/man8/*
|
||||
|
||||
%changelog
|
||||
* Wed Jun 30 2021 Wenchao Hao<haowenchao@huawei.com> - 0.100-4
|
||||
- libisns: remove sighold and sigrelse
|
||||
|
||||
* Thu Apr 4 2021 Wenchao Hao<haowenchao@huawei.com> - 0.100-3
|
||||
- Do not install isnsd.socket in isnsd.service
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user