diff --git a/Makefile b/Makefile index 5a447e5c..7558faf4 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ ifneq ($(WITH_LUAJIT),) CFLAGS += -I$(WITH_LUAJIT)/include LDFLAGS += -L$(WITH_LUAJIT)/lib else - CFLAGS += -I$(ODIR)/include/luajit-2.0 + CFLAGS += -I$(ODIR)/include/luajit-2.1 DEPS += $(ODIR)/lib/libluajit-5.1.a endif @@ -86,6 +86,7 @@ $(ODIR)/$(OPENSSL): deps/$(OPENSSL).tar.gz | $(ODIR) $(ODIR)/lib/libluajit-5.1.a: $(ODIR)/$(LUAJIT) @echo Building LuaJIT... @$(MAKE) -C $< PREFIX=$(abspath $(ODIR)) BUILDMODE=static install + @cd $(ODIR)/bin && ln -s luajit-2.1.0-beta3 luajit $(ODIR)/lib/libssl.a: $(ODIR)/$(OPENSSL) @echo Building OpenSSL... diff --git a/deps/LuaJIT-2.0.4.tar.gz b/deps/LuaJIT-2.0.4.tar.gz deleted file mode 100644 index 0713a5d6..00000000 Binary files a/deps/LuaJIT-2.0.4.tar.gz and /dev/null differ diff --git a/deps/LuaJIT-2.1.0-beta3.tar.gz b/deps/LuaJIT-2.1.0-beta3.tar.gz new file mode 100644 index 00000000..5aea267c Binary files /dev/null and b/deps/LuaJIT-2.1.0-beta3.tar.gz differ diff --git a/src/script.c b/src/script.c index 08ff7ebe..68a5d081 100644 --- a/src/script.c +++ b/src/script.c @@ -26,20 +26,20 @@ static void set_fields(lua_State *, int, const table_field *); static void set_field(lua_State *, int, char *, int); static int push_url_part(lua_State *, char *, struct http_parser_url *, enum http_parser_url_fields); -static const struct luaL_reg addrlib[] = { +static const struct luaL_Reg addrlib[] = { { "__tostring", script_addr_tostring }, { "__gc" , script_addr_gc }, { NULL, NULL } }; -static const struct luaL_reg statslib[] = { +static const struct luaL_Reg statslib[] = { { "__call", script_stats_call }, { "__index", script_stats_index }, { "__len", script_stats_len }, { NULL, NULL } }; -static const struct luaL_reg threadlib[] = { +static const struct luaL_Reg threadlib[] = { { "__index", script_thread_index }, { "__newindex", script_thread_newindex }, { NULL, NULL }