rrdtool/rrdtool-1.4.7-lua-5.2.patch

32 lines
1.1 KiB
Diff
Raw Normal View History

diff --git a/bindings/lua/rrdlua.c b/bindings/lua/rrdlua.c
index 690ba29..839833a 100644
--- a/bindings/lua/rrdlua.c
+++ b/bindings/lua/rrdlua.c
2013-05-15 15:42:47 +00:00
@@ -342,7 +342,7 @@ set_info (lua_State * L)
/**********************************************************/
-static const struct luaL_reg rrd[] = {
+static const struct luaL_Reg rrd[] = {
{"create", lua_rrd_create},
{"dump", lua_rrd_dump},
{"fetch", lua_rrd_fetch},
diff --git a/configure.ac b/configure.ac
index 2ff18a8..4993717 100644
--- a/configure.ac
+++ b/configure.ac
@@ -734,7 +734,12 @@ LUA_EOF
2013-05-15 15:42:47 +00:00
LIBS=
lua_havelib=no
LUA_HAVE_COMPAT51=DONT_HAVE_COMPAT51
- AC_SEARCH_LIBS(lua_call, lua$lua_vdot lua$lua_vndot lua,
+ if test "$lua_vndot" = "52"; then
+ CALL_FUNC=lua_callk
+ else
+ CALL_FUNC=lua_call
+ fi
+ AC_SEARCH_LIBS($CALL_FUNC, lua$lua_vdot lua$lua_vndot lua,
[AC_SEARCH_LIBS(luaL_register, lua$lua_vdot lua$lua_vndot lua,
[lua_havelib=LUA$lua_vndot],
[AC_SEARCH_LIBS(luaL_module, lualib$lua_vndot lualib$lua_vdot lualib,