Fix compilation on Max OS X with lua 5.1

This commit is contained in:
Ilia Udalov 2017-06-27 00:06:12 +03:00 committed by The Phantom Derpstorm
parent 0973d789fa
commit 8d5aa69117

View File

@ -319,7 +319,7 @@ inline int luaL_fileresult(lua_State *L, int stat, const char *fname) {
}
else {
char buf[1024];
#if defined(__GLIBC__) || defined(_POSIX_VERSION)
#if defined(__GLIBC__) || defined(_POSIX_VERSION) || defined(__APPLE__)
strerror_r(en, buf, 1024);
#else
strerror_s(buf, 1024, en);