diff --git a/plugins/lua/lua_plugin.c b/plugins/lua/lua_plugin.c index e2c9dcc3..ff9256e1 100644 --- a/plugins/lua/lua_plugin.c +++ b/plugins/lua/lua_plugin.c @@ -4,6 +4,11 @@ #include #include +#if LUA_VERSION_NUM < 502 +# define luaL_newlib(L,l) (lua_newtable(L), luaL_register(L,NULL,l)) +# define lua_rawlen lua_objlen +#endif + extern struct uwsgi_server uwsgi; struct uwsgi_lua { @@ -411,7 +416,7 @@ static void uwsgi_lua_app() { for(i=0;i