summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/lua/NWGNUmakefile3
-rw-r--r--modules/lua/mod_lua.h8
2 files changed, 11 insertions, 0 deletions
diff --git a/modules/lua/NWGNUmakefile b/modules/lua/NWGNUmakefile
index fd86b3c9ee..24f2703f58 100644
--- a/modules/lua/NWGNUmakefile
+++ b/modules/lua/NWGNUmakefile
@@ -46,6 +46,9 @@ XCFLAGS += \
#
XDEFINES += \
-DLUA_COMPAT_ALL \
+ -DLUA_COMPAT_5_2 \
+ -DLUA_COMPAT_5_1 \
+ -DLUA_COMPAT_MODULE \
$(EOLIST)
#
diff --git a/modules/lua/mod_lua.h b/modules/lua/mod_lua.h
index d3cf2e9c7c..636d35c5cb 100644
--- a/modules/lua/mod_lua.h
+++ b/modules/lua/mod_lua.h
@@ -43,6 +43,10 @@
/* Allow for Lua 5.2 backwards compatibility */
#define LUA_COMPAT_ALL
+/* Allow for Lua 5.3 backwards compatibility */
+#define LUA_COMPAT_5_2
+#define LUA_COMPAT_5_1
+#define LUA_COMPAT_MODULE
#include "lua.h"
#include "lauxlib.h"
@@ -55,6 +59,10 @@
#else
#define lua_rawlen(L,i) lua_objlen(L, (i))
#endif
+#if LUA_VERSION_NUM > 502
+/* Load mode for lua_dump() */
+#define lua_dump(a,b,c) lua_dump(a,b,c,0)
+#endif
/* Create a set of AP_LUA_DECLARE(type), AP_LUA_DECLARE_NONSTD(type) and
* AP_LUA_DECLARE_DATA with appropriate export and import tags for the platform