Commit 79c01447 authored by captainwong's avatar captainwong

testing linux build 9

parent 910c572f
...@@ -7,7 +7,13 @@ ...@@ -7,7 +7,13 @@
#include "currentthread.h" #include "currentthread.h"
#include <stdlib.h> // getenv #include <stdlib.h> // getenv
#include <errno.h> #include <errno.h>
#include <string.h> // strerror_s #include <string.h> // strerror_r
#ifdef JLIB_WINDOWS
inline void strerror_r(int errnum, char* buf, size_t buflen) {
strerror_s(buf, buflen, errnum);
}
#endif
namespace jlib namespace jlib
{ {
...@@ -191,7 +197,7 @@ inline LogStream& operator<<(LogStream& s, detail::T t) { ...@@ -191,7 +197,7 @@ inline LogStream& operator<<(LogStream& s, detail::T t) {
} }
inline const char* strerror_t(int savedErrno) { inline const char* strerror_t(int savedErrno) {
strerror_s(detail::t_errnobuf, sizeof(detail::t_errnobuf), savedErrno); strerror_r(savedErrno, detail::t_errnobuf, sizeof(detail::t_errnobuf));
return detail::t_errnobuf; return detail::t_errnobuf;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment