summary refs log tree commit diff
path: root/src/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/system.c')
-rw-r--r--src/system.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/system.c b/src/system.c
index d375de0..d986efd 100644
--- a/src/system.c
+++ b/src/system.c
@@ -26,7 +26,9 @@
  * SUCH DAMAGE.
  */
 
+#include <signal.h>
 #include <string.h>
+#include "output.h"
 #include "system.h"
 
 #ifndef HAVE_MEMPCPY
@@ -53,6 +55,18 @@ char *strchrnul(const char *s, int c)
 }
 #endif
 
+#ifndef HAVE_STRSIGNAL
+char *strsignal(int sig)
+{
+	static char buf[19];
+
+	if ((unsigned)sig < NSIG && sys_siglist[sig])
+		return (char *)sys_siglist[sig];
+	fmtstr(buf, sizeof(buf), "Signal %d", sig); 
+	return buf;
+}
+#endif
+
 #ifndef HAVE_BSEARCH
 void *bsearch(const void *key, const void *base, size_t nmemb,
 	      size_t size, int (*cmp)(const void *, const void *))