rrdtool/rrdtool-1.5.0-lua-5.2.patch

41 lines
1.4 KiB
Diff
Raw Normal View History

diff --git a/bindings/lua/rrdlua.c b/bindings/lua/rrdlua.c
index bfbc174..b54f787 100644
--- a/bindings/lua/rrdlua.c
+++ b/bindings/lua/rrdlua.c
@@ -350,7 +350,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 6d277bf..d0d9ea0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -810,7 +810,12 @@ LUA_EOF
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" -ge "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,
@@ -853,7 +853,7 @@ LUA_EOF
done
fi
- LUA_RRD_LIBDIR="$langpref/lib/lua/$lua_vdot"
+ LUA_RRD_LIBDIR="$libdir/lua/$lua_vdot"
# if lua 5.0 can't find compat-5.1, force installation of
# compat-5.1.lua together with RRDtool.
if test "$lua_vdot" = "5.0" -a "$LUA_HAVE_COMPAT51" != "HAVE_COMPAT51"; then