summaryrefslogtreecommitdiffstats
path: root/libhb/compat.h
diff options
context:
space:
mode:
authorSean McGovern <[email protected]>2016-07-10 17:22:45 -0400
committerSean McGovern <[email protected]>2016-07-11 23:05:26 -0400
commitb8bf66f0b15842ce240a3320ca4d23aaf8165bf0 (patch)
tree821b07cb5f004b89cc8614c7f9073bf69a6b35dd /libhb/compat.h
parente44e48382e1a97815f005e3efd6c36c06c773c40 (diff)
libhb: add an implementation of strerror_r()
Diffstat (limited to 'libhb/compat.h')
-rw-r--r--libhb/compat.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libhb/compat.h b/libhb/compat.h
index 8c4ad58bf..618941e9e 100644
--- a/libhb/compat.h
+++ b/libhb/compat.h
@@ -25,4 +25,14 @@
char *strtok_r(char *s, const char *delim, char **save_ptr);
#endif // HB_NEED_STRTOK_R
+#ifndef HAS_STRERROR_R
+#ifndef _GNU_SOURCE
+#include <sys/types.h>
+/*
+ * POSIX definition of strerror_r() -- see http://pubs.opengroup.org/onlinepubs/9699919799/functions/strerror.html
+ */
+int strerror_r(int errnum, char *strerrbuf, size_t buflen);
+#endif // _GNU_SOURCE
+#endif // HAVE_STRERROR_R
+
#endif // HB_COMPAT_H