summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index 0f24fb5..7d2fe2a 100644
--- a/proto.h
+++ b/proto.h
@@ -59,6 +59,15 @@ extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
#endif /* STDC_HEADERS */
+#if HAVE_STRERROR
+/* Smells like POSIX. */
+#else
+/* Assume BSD-style sys_errlist[]. */
+extern int sys_nerr;
+extern char *sys_errlist[];
+#define strerror(x) ((0 <= (x)) && (errno < (x)) ? sys_errlist[x] : (char *)0)
+#endif
+
#if HAVE_UNISTD_H
#include <unistd.h>
#endif