summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-misc.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2017-09-25 09:48:10 +1000
committerDarren Tucker <dtucker@zip.com.au>2017-09-25 09:48:10 +1000
commit44fc334c7a9ebdd08addb6d5fa005369897fddeb (patch)
treef1e113af2215b661dc01d89785897069c13a5693 /openbsd-compat/bsd-misc.c
parent218e6f98df566fb9bd363f6aa47018cb65ede196 (diff)
Add minimal strsignal for platforms without it.
Diffstat (limited to 'openbsd-compat/bsd-misc.c')
-rw-r--r--openbsd-compat/bsd-misc.c10
1 files changed, 10 insertions, 0 deletions
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)
104} 104}
105#endif 105#endif
106 106
107#if !defined(HAVE_STRSIGNAL)
108char *strsignal(int sig)
109{
110 static char buf[16];
111
112 (void)snprintf(buf, sizeof(buf), "%d", sig);
113 return buf;
114}
115#endif
116
107#ifndef HAVE_UTIMES 117#ifndef HAVE_UTIMES
108int utimes(char *filename, struct timeval *tvp) 118int utimes(char *filename, struct timeval *tvp)
109{ 119{