From ce940e173167d0e8beb1a3f6974b1da43c78905c Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 25 Nov 2014 08:44:06 +0100 Subject: use strsignal --- fbtools.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'fbtools.c') diff --git a/fbtools.c b/fbtools.c index 4b789ee..feac3fe 100644 --- a/fbtools.c +++ b/fbtools.c @@ -23,6 +23,13 @@ #include "fbtools.h" +#ifndef HAVE_STRSIGNAL +static const char *strsignal(int signr) +{ + return sys_siglist[signr]; +} +#endif + /* -------------------------------------------------------------------- */ /* exported stuff */ @@ -519,6 +526,6 @@ fb_catch_exit_signals(void) /* cleanup */ fb_cleanup(); - fprintf(stderr,"Oops: %s\n",sys_siglist[termsig]); + fprintf(stderr,"Oops: %s\n",strsignal(termsig)); exit(42); } -- cgit