View | Details | Raw Unified | Return to bug 202302 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-1 / +1 lines)
Lines 58-64 Link Here
58
IPV6_CONFIGURE_OFF=     --disable-ipv6
58
IPV6_CONFIGURE_OFF=     --disable-ipv6
59
LIBEV_CONFIGURE_WITH=   libev=${LOCALBASE}
59
LIBEV_CONFIGURE_WITH=   libev=${LOCALBASE}
60
LIBEV_LIB_DEPENDS=      libev.so:${PORTSDIR}/devel/libev
60
LIBEV_LIB_DEPENDS=      libev.so:${PORTSDIR}/devel/libev
61
LUA_USES=               lua:51+
61
LUA_USES=               lua:51
62
LUA_CONFIGURE_WITH=     lua
62
LUA_CONFIGURE_WITH=     lua
63
LUA_CONFIGURE_ENV=      LUA_CFLAGS="-I${LUA_INCDIR}" LUA_LIBS="-L${LUA_LIBDIR} -llua-${LUA_VER}"
63
LUA_CONFIGURE_ENV=      LUA_CFLAGS="-I${LUA_INCDIR}" LUA_LIBS="-L${LUA_LIBDIR} -llua-${LUA_VER}"
64
MEMCACHE_LIB_DEPENDS=   libmemcache.so:${PORTSDIR}/databases/libmemcache
64
MEMCACHE_LIB_DEPENDS=   libmemcache.so:${PORTSDIR}/databases/libmemcache
(-)files/patch-src_mod__cml__lua.c (-25 lines)
Lines 1-25 Link Here
1
--- src/mod_cml_lua.c.orig	2015-07-26 10:36:36 UTC
2
+++ src/mod_cml_lua.c
3
@@ -28,6 +28,10 @@ typedef char HASHHEX[HASHHEXLEN+1];
4
 #include <lualib.h>
5
 #include <lauxlib.h>
6
 
7
+#if LUA_VERSION_NUM >= 502
8
+#define LUA_GLOBALSINDEX LUA_REGISTRYINDEX
9
+#endif
10
+
11
 typedef struct {
12
 	stream st;
13
 	int done;
14
@@ -291,7 +295,11 @@ int cache_parse_lua(server *srv, connect
15
 	lua_settable(L, LUA_GLOBALSINDEX);
16
 
17
 	/* load lua program */
18
+#if LUA_VERSION_NUM >= 502
19
+	if (lua_load(L, load_file, &rm, fn->ptr, NULL) || lua_pcall(L,0,1,0)) {
20
+#else
21
 	if (lua_load(L, load_file, &rm, fn->ptr) || lua_pcall(L,0,1,0)) {
22
+#endif
23
 		log_error_write(srv, __FILE__, __LINE__, "s",
24
 				lua_tostring(L,-1));
25
 
(-)files/patch-src_mod__magnet.c (-13 lines)
Lines 1-13 Link Here
1
--- src/mod_magnet.c.orig	2015-07-26 10:36:36 UTC
2
+++ src/mod_magnet.c
3
@@ -24,6 +24,10 @@
4
 #define MAGNET_CONFIG_PHYSICAL_PATH "magnet.attract-physical-path-to"
5
 #define MAGNET_RESTART_REQUEST      99
6
 
7
+#if LUA_VERSION_NUM >= 502
8
+#define LUA_GLOBALSINDEX LUA_REGISTRYINDEX
9
+#endif
10
+
11
 /* plugin config for all request/connections */
12
 
13
 static jmp_buf exceptionjmp;

Return to bug 202302