Check for sys_signame.

This commit is contained in:
Nicholas Marriott 2020-04-16 10:08:16 +01:00
parent dd66ede38b
commit 1aa2845026
2 changed files with 5 additions and 0 deletions

View File

@ -87,6 +87,9 @@ AC_CHECK_HEADERS([ \
util.h \ util.h \
]) ])
# Look for sys_signame.
AC_SEARCH_LIBS(sys_signame, )
# Look for fmod. # Look for fmod.
AC_CHECK_LIB(m, fmod) AC_CHECK_LIB(m, fmod)

2
tmux.c
View File

@ -170,8 +170,10 @@ sig2name(int signo)
{ {
static char s[11]; static char s[11];
#ifdef HAVE_SYS_SIGNAME
if (signo > 0 && signo < NSIG) if (signo > 0 && signo < NSIG)
return (sys_signame[signo]); return (sys_signame[signo]);
#endif
xsnprintf(s, sizeof s, "%d", signo); xsnprintf(s, sizeof s, "%d", signo);
return (s); return (s);
} }