Skip to content

Commit 20ef01d

Browse files
committed
Allow LuaJIT 2.1 to be used
1 parent 28f6f22 commit 20ef01d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

build/lua.m4

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ else
6868
case $LUA_PKG_VERSION in
6969
(5.1*) LUA_CFLAGS="-DWITH_LUA_5_1 ${LUA_CFLAGS}" ; lua_5_1=1 ;;
7070
(5.2*) LUA_CFLAGS="-DWITH_LUA_5_2 ${LUA_CFLAGS}" ; lua_5_2=1 ;;
71-
(2.*) LUA_CFLAGS="-DWITH_LUA_5_1 ${LUA_CFLAGS}" ; lua_5_1=1 ;;
71+
(2.0*) LUA_CFLAGS="-DWITH_LUA_5_1 ${LUA_CFLAGS}" ; lua_5_1=1 ;;
72+
(2.1*) LUA_CFLAGS="-DWITH_LUA_5_1 -DWITH_LUA_JIT_2_1 ${LUA_CFLAGS}" ; lua_5_1=1 ;;
7273
esac
7374
AC_MSG_NOTICE([LUA pkg-config version: ${LUA_PKG_VERSION}])
7475
fi

src/engine/lua.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static const struct luaL_Reg mscLuaLib[] = {
102102
} // namespace modsecurity
103103

104104
#ifdef WITH_LUA
105-
#if defined LUA_VERSION_NUM && LUA_VERSION_NUM < 502
105+
#if defined LUA_VERSION_NUM && LUA_VERSION_NUM < 502 && !defined WITH_LUA_JIT_2_1
106106
/*
107107
** Adapted from Lua 5.2.0
108108
*/

0 commit comments

Comments
 (0)