Skip to content

ModSecurity 3 no longer compiles with LuaJIT 2.1 #1909

Closed
@mdunc

Description

@mdunc

A recent change in ModSecurity seems to have broken compatibility with LuaJIT (which is compatible with Lua 5.1). The following is the error when compiling:

In file included from ../src/rule_script.h:22:0,
                 from seclang-parser.yy:20,
                 from seclang-parser.cc:46:
../src/engine/lua.h: In function 'void luaL_setfuncs(lua_State*, const luaL_Reg*, int)':
../src/engine/lua.h:111:13: error: 'void luaL_setfuncs(lua_State*, const luaL_Reg*, int)' was declared 'extern' and later 'static' [-fpermissive]
 static void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup) {
             ^~~~~~~~~~~~~
In file included from /usr/include/luajit-2.1/lua.hpp:5:0,
                 from ../src/engine/lua.h:17,
                 from ../src/rule_script.h:22,
                 from seclang-parser.yy:20,
                 from seclang-parser.cc:46:
/usr/include/luajit-2.1/lauxlib.h:88:18: note: previous declaration of 'void luaL_setfuncs(lua_State*, const luaL_Reg*, int)'
 LUALIB_API void (luaL_setfuncs) (lua_State *L, const luaL_Reg *l, int nup);
                  ^~~~~~~~~~~~~
make[3]: *** [Makefile:2013: parser/libmodsecurity_la-seclang-parser.lo] Error 1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions