mirror of
https://github.com/falcosecurity/falco.git
synced 2025-10-22 03:49:36 +00:00
Statically link in lpeg lua library
This commit is contained in:
@@ -5,10 +5,13 @@ include_directories(${PROJECT_SOURCE_DIR}/../sysdig/userspace/libscap)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/../sysdig/userspace/libsinsp)
|
||||
include_directories("${PROJECT_BINARY_DIR}/userspace/digwatch")
|
||||
include_directories("${CURL_INCLUDE_DIR}")
|
||||
include_directories("${LPEG_SRC}")
|
||||
|
||||
add_executable(digwatch formats.cpp fields.cpp rules.cpp digwatch.cpp)
|
||||
|
||||
target_link_libraries(digwatch sinsp)
|
||||
target_link_libraries(digwatch "${LPEG_SRC}/lpeg.a")
|
||||
|
||||
|
||||
set(DIGWATCH_LUA_MAIN "rule_loader.lua")
|
||||
configure_file(config_digwatch.h.in config_digwatch.h)
|
||||
|
@@ -14,6 +14,7 @@ extern "C" {
|
||||
#include "lua.h"
|
||||
#include "lualib.h"
|
||||
#include "lauxlib.h"
|
||||
#include "lpeg.h"
|
||||
}
|
||||
|
||||
#include <sinsp.h>
|
||||
@@ -279,6 +280,7 @@ int digwatch_init(int argc, char **argv)
|
||||
// Initialize Lua interpreter
|
||||
ls = lua_open();
|
||||
luaL_openlibs(ls);
|
||||
luaopen_lpeg(ls);
|
||||
add_lua_path(ls, lua_dir);
|
||||
|
||||
rules = new digwatch_rules(inspector, ls, lua_main_filename);
|
||||
|
6
userspace/digwatch/lpeg.h
Normal file
6
userspace/digwatch/lpeg.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "lua.h"
|
||||
|
||||
int luaopen_lpeg (lua_State *L);
|
||||
|
Reference in New Issue
Block a user