compat for g fucking libgarbage

This commit is contained in:
ThePhD 2016-03-30 03:33:44 -04:00
parent 623f83547d
commit a683d615a5

View File

@ -308,7 +308,11 @@ inline int luaL_fileresult(lua_State *L, int stat, const char *fname) {
}
else {
char buf[1024];
#ifdef __GLIBC__
strerror_r(en, buf, 1024);
#else
strerror_s(buf, 1024, en);
#endif
lua_pushnil(L);
if (fname)
lua_pushfstring(L, "%s: %s", fname, buf);