From a683d615a5c6d8890dd81f1ebde29e85f20491bd Mon Sep 17 00:00:00 2001 From: ThePhD Date: Wed, 30 Mar 2016 03:33:44 -0400 Subject: [PATCH] compat for g fucking libgarbage --- sol/compatibility/5.x.x.inl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sol/compatibility/5.x.x.inl b/sol/compatibility/5.x.x.inl index 377cba2e..1d420e3f 100644 --- a/sol/compatibility/5.x.x.inl +++ b/sol/compatibility/5.x.x.inl @@ -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);