diff --git a/common/signal.c b/common/signal.c index d308c175c..a56e6d6f4 100644 --- a/common/signal.c +++ b/common/signal.c @@ -89,8 +89,12 @@ get_signal_name( int signum ) reentrant. */ #if HAVE_SIGDESCR_NP return sigdescr_np (signum); -#elif HAVE_DECL_SYS_SIGLIST && defined(NSIG) - return (signum >= 0 && signum < NSIG) ? sys_siglist[signum] : "?"; +#elif (HAVE_DECL_SYS_SIGLIST || HAVE_DECL__SYS_SIGLIST) && defined(NSIG) +#if HAVE_DECL_SYS_SIGLIST +#undef _sys_siglist +#define _sys_siglist sys_siglist +#endif + return (signum >= 0 && signum < NSIG) ? _sys_siglist[signum] : "?"; #else return NULL; #endif diff --git a/configure.ac b/configure.ac index 1c1c892ca..29aa30973 100644 --- a/configure.ac +++ b/configure.ac @@ -1341,7 +1341,7 @@ fi AC_TYPE_SIZE_T AC_TYPE_MODE_T AC_CHECK_FUNCS([sigdescr_np]) -AC_CHECK_DECLS([sys_siglist],[],[],[#include +AC_CHECK_DECLS([sys_siglist, _sys_siglist],[],[],[#include /* NetBSD declares sys_siglist in unistd.h. */ #ifdef HAVE_UNISTD_H # include