components/lighttpd/patches/06-fix_lua.patch
changeset 7006 eb24eb49f7c4
parent 7005 6bae9701e86a
child 7007 8aba3abf65e1
--- a/components/lighttpd/patches/06-fix_lua.patch	Tue Sep 20 00:25:26 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-Developed in-house, fed to community. Developed in order to
-reflect community issue.
-http://redmine.lighttpd.net/issues/2421
-Awaiting accept.
-
---- src/mod_cml_lua.c.orig	2012-10-22 06:17:17.418886286 -0700
-+++ src/mod_cml_lua.c	2012-10-22 06:25:50.289753316 -0700
-@@ -28,6 +28,10 @@
- #include <lualib.h>
- #include <lauxlib.h>
- 
-+#if LUA_VERSION_NUM >= 502
-+#define LUA_GLOBALSINDEX LUA_REGISTRYINDEX
-+#endif
-+
- typedef struct {
- 	stream st;
- 	int done;
-@@ -291,7 +291,11 @@
- 	lua_settable(L, LUA_GLOBALSINDEX);
- 
- 	/* load lua program */
-+#if LUA_VERSION_NUM >= 502
-+	if (lua_load(L, load_file, &rm, fn->ptr, NULL) || lua_pcall(L,0,1,0)) {
-+#else
- 	if (lua_load(L, load_file, &rm, fn->ptr) || lua_pcall(L,0,1,0)) {
-+#endif
- 		log_error_write(srv, __FILE__, __LINE__, "s",
- 				lua_tostring(L,-1));
-
---- src/mod_magnet.c	2011-06-13 04:17:01.000000000 -0700
-+++ src/mod_magnet.c2	2013-10-01 06:39:18.771549986 -0700
-@@ -24,6 +24,10 @@
- #define MAGNET_CONFIG_PHYSICAL_PATH "magnet.attract-physical-path-to"
- #define MAGNET_RESTART_REQUEST      99
- 
-+#if LUA_VERSION_NUM >= 502
-+#define LUA_GLOBALSINDEX LUA_REGISTRYINDEX
-+#endif
-+
- /* plugin config for all request/connections */
- 
- static jmp_buf exceptionjmp;