File pdns-rec-lua52.patch of Package pdns-recursor
--- lua-pdns-recursor.cc.orig
+++ lua-pdns-recursor.cc
@@ -28,6 +28,7 @@ PowerDNSLua::~PowerDNSLua()
extern "C" {
#undef L
+#define LUA_COMPAT_ALL
/* Include the Lua API header files. */
#include <lua.h>
#include <lauxlib.h>
@@ -114,7 +115,11 @@ int logLua(lua_State *lua)
PowerDNSLua::PowerDNSLua(const std::string& fname)
{
- d_lua = lua_open();
+#if LUA_VERSION_NUM > 501
+ d_lua = luaL_newstate();
+#else
+ d_lua = lua_open();
+#endif
#ifndef LUA_VERSION_NUM
luaopen_base(d_lua);