diff --git a/meson.build b/meson.build index af89919e6..a94f04310 100644 --- a/meson.build +++ b/meson.build @@ -234,6 +234,10 @@ if copt_platform == 'win' configure_file(input: input_and_output[0], output: input_and_output[1], copy: true) endforeach endif +elif copt_platform == 'lin' + if uopt_static != 'none' + project_link_args = [ '-static-libgcc', '-static-libstdc++' ] + endif endif if copt_platform == 'mac' and uopt_lua == 'luajit' diff --git a/src/lua/LuaCompat.c b/src/lua/LuaCompat.c index 96a56fef7..cabf38806 100644 --- a/src/lua/LuaCompat.c +++ b/src/lua/LuaCompat.c @@ -19,11 +19,13 @@ void tpt_lua_getmainthread(lua_State *L) #else +# ifndef lua_pushglobaltable // * Thank you moonjit // Implement function added in lua 5.2 that we now use void lua_pushglobaltable(lua_State *L) { lua_pushvalue(L, LUA_GLOBALSINDEX); } +# endif void tpt_lua_setmainthread(lua_State *L) { diff --git a/src/lua/LuaCompat.h b/src/lua/LuaCompat.h index 8ff3ccf69..1ca761ca8 100644 --- a/src/lua/LuaCompat.h +++ b/src/lua/LuaCompat.h @@ -17,7 +17,9 @@ LUALIB_API void tpt_lua_getmainthread(lua_State *L); #if LUA_VERSION_NUM >= 502 LUALIB_API int (luaL_typerror) (lua_State *L, int narg, const char *tname); #else +# ifndef lua_pushglobaltable // * Thank you moonjit LUALIB_API void (lua_pushglobaltable) (lua_State *L); +# endif #endif int luaL_tostring(lua_State *L, int n);