Hacky compile fix for mingw compile issue reported by bat3a on bf-committers

I've been using this fix in another branch locally, so it seems to work fine.
The other #ifdef checks should be checked on too, as __MINGW32__ and __MINGW64__
do NOT seem to be defined when compiling that file
This commit is contained in:
Joshua Leung
2016-01-22 13:59:54 +13:00
parent e965e92fa5
commit 445f7910e8

View File

@@ -149,8 +149,13 @@ inline struct tm* localtime_r(const time_t* timep, struct tm* result) {
}
inline char* strerror_r(int errnum, char* buf, size_t buflen) {
#ifdef FREE_WINDOWS
strncpy(buf, "Not implemented yet", buflen);
return buf;
#else
strerror_s(buf, buflen, errnum);
return buf;
#endif
}
#ifndef __cplusplus