summaryrefslogtreecommitdiff
path: root/common/compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/compat.c')
-rw-r--r--common/compat.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/common/compat.c b/common/compat.c
index 3b1361c..e7bee3c 100644
--- a/common/compat.c
+++ b/common/compat.c
@@ -807,3 +807,19 @@ getauxval (unsigned long type)
}
#endif /* HAVE_GETAUXVAL */
+
+#ifndef HAVE_STRERROR_R
+
+int
+strerror_r (int errnum,
+ char *buf,
+ size_t buflen)
+{
+#ifdef OS_WIN32
+ return strerror_s (buf, buflen, errnum);
+#else
+ #error no strerror_r implementation
+#endif
+}
+
+#endif /* HAVE_STRERROR_R */