mirror of
https://github.com/falcosecurity/falco.git
synced 2025-08-30 12:30:56 +00:00
update(ci,cmake): add support for emscripten build
Signed-off-by: rohith-raju <rohithraju488@gmail.com>
This commit is contained in:
parent
105f2f6ee3
commit
e8ee850dee
@ -36,7 +36,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
list(APPEND FALCO_UNIT_TESTS_SOURCES
|
||||
falco/test_atomic_signal_handler.cpp
|
||||
falco/app/actions/test_configure_interesting_sets.cpp
|
||||
falco/app/actions/test_configure_syscall_buffer.cpp)
|
||||
falco/app/actions/test_configure_syscall_buffer_num.cpp)
|
||||
endif()
|
||||
|
||||
set(FALCO_UNIT_TESTS_INCLUDES
|
||||
|
@ -57,19 +57,22 @@ bool stats_writer::init_ticker(uint32_t interval_msec, std::string &err)
|
||||
sev.sigev_notify = SIGEV_SIGNAL;
|
||||
sev.sigev_signo = SIGALRM;
|
||||
sev.sigev_value.sival_ptr = &timerid;
|
||||
#ifndef __EMSCRIPTEN__
|
||||
if (timer_create(CLOCK_MONOTONIC, &sev, &timerid) == -1) {
|
||||
err = std::string("Could not create periodic timer: ") + strerror(errno);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
timer.it_value.tv_sec = interval_msec / 1000;
|
||||
timer.it_value.tv_nsec = (interval_msec % 1000) * 1000 * 1000;
|
||||
timer.it_interval = timer.it_value;
|
||||
|
||||
#ifndef __EMSCRIPTEN__
|
||||
if (timer_settime(timerid, 0, &timer, NULL) == -1) {
|
||||
err = std::string("Could not set up periodic timer: ") + strerror(errno);
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user