From 44fc334c7a9ebdd08addb6d5fa005369897fddeb Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 25 Sep 2017 09:48:10 +1000 Subject: Add minimal strsignal for platforms without it. --- openbsd-compat/bsd-misc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'openbsd-compat/bsd-misc.c') diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index cfd73260a..29f6ad38c 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -104,6 +104,16 @@ const char *strerror(int e) } #endif +#if !defined(HAVE_STRSIGNAL) +char *strsignal(int sig) +{ + static char buf[16]; + + (void)snprintf(buf, sizeof(buf), "%d", sig); + return buf; +} +#endif + #ifndef HAVE_UTIMES int utimes(char *filename, struct timeval *tvp) { -- cgit v1.2.3