os-unix.hpp: Use the old strerror_r insetad of the newfangled one.

db4
Doug Coleman 2014-07-16 17:08:02 -07:00
parent 810031b02c
commit fe548d9ed7
1 changed files with 8 additions and 0 deletions

View File

@ -31,6 +31,14 @@ typedef char symbol_char;
#define OPEN_READ(path) fopen(path, "rb")
#define OPEN_WRITE(path) fopen(path, "wb")
#ifdef _GNU_SOURCE
extern "C" {
extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen) __THROW __nonnull ((2));
}
#define strerror_r __xpg_strerror_r
#endif
#define THREADSAFE_STRERROR(errnum, buf, buflen) strerror_r(errnum, buf, buflen)
#define print_native_string(string) print_string(string)