--- a/src/lib-lua/dlua-script.c +++ b/src/lib-lua/dlua-script.c @@ -253,7 +253,11 @@ static struct dlua_script *dlua_create_s /* lua API says that lua_newstate will return NULL only if it's out of memory. this cannot really happen with our allocator as it will call i_fatal_status anyways if it runs out of memory */ +#if LUA_VERSION_NUM >= 505 + script->L = lua_newstate(dlua_alloc, script, luaL_makeseed(NULL)); +#else script->L = lua_newstate(dlua_alloc, script); +#endif i_assert(script->L != NULL); script->ref = 1; lua_atpanic(script->L, dlua_atpanic);