mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
compat for g fucking libgarbage
This commit is contained in:
parent
623f83547d
commit
a683d615a5
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user