logswan

Fast Web log analyzer using probabilistic data structures
Log | Files | Refs | README | LICENSE

commit af32f3a90ebd1d1b1a1c1f653c0bb7fb32441e00
parent 240d4ac165eb5f58c16f9792e670a6c9f3866b02
Author: Frederic Cambus <fred@statdns.com>
Date:   Fri, 25 Oct 2019 15:07:16 +0200

Check if system has seccomp in CMakeLists.txt.

Diffstat:
MCMakeLists.txt | 12+++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -5,7 +5,7 @@ # https://www.logswan.org # # # # Created: 2015-05-31 # -# Last Updated: 2018-10-15 # +# Last Updated: 2018-10-25 # # # # Logswan is released under the BSD 2-Clause license. # # See LICENSE file for details. # @@ -24,6 +24,16 @@ list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_OPENBSD_SOURCE) check_function_exists(pledge HAVE_PLEDGE) check_function_exists(strtonum HAVE_STRTONUM) +# Check if system has seccomp +message(STATUS "Looking for seccomp") +find_path(SECCOMP NAMES "linux/seccomp.h") +if(SECCOMP) + message(STATUS "Looking for seccomp - found") + add_definitions(-DHAVE_SECCOMP=1) +else() + message(STATUS "Looking for seccomp - not found") +endif() + # Additional include directories for compat functions + dependencies include_directories("compat") include_directories("deps/hll")