mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-18 07:51:12 +00:00
Detect strlcpy on the fly (musl libc)
Detect strlcpy on the fly, as was done in https://github.com/falcosecurity/libs/pull/110. Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
This commit is contained in:
@@ -63,5 +63,15 @@ set(USE_BUNDLED_JSONCPP ON CACHE BOOL "")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${FALCOSECURITY_LIBS_SOURCE_DIR}/cmake/modules")
|
||||
|
||||
include(CheckSymbolExists)
|
||||
check_symbol_exists(strlcpy "string.h" HAVE_STRLCPY)
|
||||
if(HAVE_STRLCPY)
|
||||
message(STATUS "Existing strlcpy found, will *not* use local definition by setting -DHAVE_STRLCPY.")
|
||||
add_definitions(-DHAVE_STRLCPY)
|
||||
else()
|
||||
message(STATUS "No strlcpy found, will use local definition")
|
||||
endif()
|
||||
|
||||
include(libscap)
|
||||
include(libsinsp)
|
||||
|
||||
|
Reference in New Issue
Block a user