forked from pool/apache2-mod_security2
Petr Gajdos
404e95423a
- fix build for lua 5.3 OBS-URL: https://build.opensuse.org/request/show/319200 OBS-URL: https://build.opensuse.org/package/show/Apache:Modules/apache2-mod_security2?expand=0&rev=67
27 lines
869 B
Diff
27 lines
869 B
Diff
From 422e22141b9f6cdd0496919093fcf51b02732b84 Mon Sep 17 00:00:00 2001
|
|
From: Athmane Madjoudj <athmane@fedoraproject.org>
|
|
Date: Fri, 13 Feb 2015 13:24:50 +0100
|
|
Subject: [PATCH] Fix build issue with Lua >= 5.3
|
|
|
|
---
|
|
apache2/msc_lua.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/apache2/msc_lua.c b/apache2/msc_lua.c
|
|
index f4482ae..58206a7 100644
|
|
--- a/apache2/msc_lua.c
|
|
+++ b/apache2/msc_lua.c
|
|
@@ -111,8 +111,11 @@ char *lua_compile(msc_script **script, const char *filename, apr_pool_t *pool) {
|
|
dump.pool = pool;
|
|
dump.parts = apr_array_make(pool, 128, sizeof(msc_script_part *));
|
|
|
|
+#if LUA_VERSION_NUM >= 503
|
|
+ lua_dump(L, dump_writer, &dump, 1);
|
|
+#else
|
|
lua_dump(L, dump_writer, &dump);
|
|
-
|
|
+#endif
|
|
(*script) = apr_pcalloc(pool, sizeof(msc_script));
|
|
(*script)->name = filename;
|
|
(*script)->parts = dump.parts;
|