aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2020-04-16 10:08:16 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2020-04-16 10:08:16 +0100
commit1aa2845026710b3f90b56952a7feb6e88d7e5c26 (patch)
treee8a112f2d161f99872f03c8c742405bce108ec91
parentdd66ede38beab6ccb9b3848c218421c43499e761 (diff)
downloadrtmux-1aa2845026710b3f90b56952a7feb6e88d7e5c26.tar.gz
rtmux-1aa2845026710b3f90b56952a7feb6e88d7e5c26.tar.bz2
rtmux-1aa2845026710b3f90b56952a7feb6e88d7e5c26.zip
Check for sys_signame.
-rw-r--r--configure.ac3
-rw-r--r--tmux.c2
2 files changed, 5 insertions, 0 deletions
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);
}