mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
common: Fix get_signal_name for GNU/Linux.
* common/signal.c (get_signal_name): Use sigdescr_np if available.
* configure.ac: Check the function.
--
Backport master commit of:
c4ba712736
GnuPG-bug-id: 5568
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
f64e0f63d6
commit
d5f9481186
2 changed files with 4 additions and 2 deletions
|
@ -87,7 +87,9 @@ get_signal_name( int signum )
|
|||
{
|
||||
/* Note that we can't use strsignal(), because it is not
|
||||
reentrant. */
|
||||
#if HAVE_DECL_SYS_SIGLIST && defined(NSIG)
|
||||
#if HAVE_SIGDESCR_NP
|
||||
return sigdescr_np (signum);
|
||||
#elif HAVE_DECL_SYS_SIGLIST && defined(NSIG)
|
||||
return (signum >= 0 && signum < NSIG) ? sys_siglist[signum] : "?";
|
||||
#else
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue