diff --git a/configure.ac b/configure.ac index e29ebdc7..359d2137 100644 --- a/configure.ac +++ b/configure.ac @@ -87,6 +87,9 @@ AC_CHECK_HEADERS([ \ util.h \ ]) +# Look for sys_signame. +AC_SEARCH_LIBS(sys_signame, ) + # Look for fmod. AC_CHECK_LIB(m, fmod) diff --git a/tmux.c b/tmux.c index f5cd4343..e16642fd 100644 --- a/tmux.c +++ b/tmux.c @@ -170,8 +170,10 @@ sig2name(int signo) { static char s[11]; +#ifdef HAVE_SYS_SIGNAME if (signo > 0 && signo < NSIG) return (sys_signame[signo]); +#endif xsnprintf(s, sizeof s, "%d", signo); return (s); }