fix(webserver): fix inconsistent include directives trying to compile the webserver on Apple

Signed-off-by: Paolo Polidori <paolo.polidori@sysdig.com>
This commit is contained in:
Paolo Polidori
2026-02-14 15:24:13 +01:00
committed by poiana
parent 514470abd1
commit 865284dffe
3 changed files with 7 additions and 7 deletions

View File

@@ -17,7 +17,7 @@ limitations under the License.
#include "actions.h"
#if !defined(_WIN32) && !defined(__EMSCRIPTEN__) && !defined(MINIMAL_BUILD)
#if defined(__linux__) && !defined(__EMSCRIPTEN__) && !defined(MINIMAL_BUILD)
#include "webserver.h"
#endif
@@ -25,7 +25,7 @@ using namespace falco::app;
using namespace falco::app::actions;
falco::app::run_result falco::app::actions::start_webserver(falco::app::state& state) {
#if !defined(_WIN32) && !defined(__EMSCRIPTEN__) && !defined(MINIMAL_BUILD)
#if defined(__linux__) && !defined(__EMSCRIPTEN__) && !defined(MINIMAL_BUILD)
if(state.is_capture_mode() || !state.config->m_webserver_enabled) {
return run_result::ok();
}
@@ -50,7 +50,7 @@ falco::app::run_result falco::app::actions::start_webserver(falco::app::state& s
}
falco::app::run_result falco::app::actions::stop_webserver(falco::app::state& state) {
#if !defined(_WIN32) && !defined(__EMSCRIPTEN__) && !defined(MINIMAL_BUILD)
#if defined(__linux__) && !defined(__EMSCRIPTEN__) && !defined(MINIMAL_BUILD)
if(state.is_capture_mode() || !state.config->m_webserver_enabled) {
return run_result::ok();
}

View File

@@ -23,7 +23,7 @@ limitations under the License.
#include "restart_handler.h"
#include "../configuration.h"
#include "../stats_writer.h"
#if !defined(_WIN32) && !defined(__EMSCRIPTEN__) && !defined(MINIMAL_BUILD)
#if defined(__linux__) && !defined(__EMSCRIPTEN__) && !defined(MINIMAL_BUILD)
#include "../webserver.h"
#endif
@@ -109,7 +109,7 @@ struct state {
// Helper responsible for watching of handling hot application restarts
std::shared_ptr<restart_handler> restarter;
#if !defined(_WIN32) && !defined(__EMSCRIPTEN__) && !defined(MINIMAL_BUILD)
#if defined(__linux__) && !defined(__EMSCRIPTEN__) && !defined(MINIMAL_BUILD)
falco_webserver webserver;
#endif
// Set by start_webserver to start prometheus metrics

View File

@@ -28,7 +28,7 @@ limitations under the License.
#include "outputs_program.h"
#include "outputs_syslog.h"
#endif
#if !defined(_WIN32) && !defined(__EMSCRIPTEN__) && !defined(MINIMAL_BUILD)
#if defined(__linux__) && !defined(__EMSCRIPTEN__) && !defined(MINIMAL_BUILD)
#include "outputs_http.h"
#endif
@@ -93,7 +93,7 @@ void falco_outputs::add_output(const falco::outputs::config &oc) {
oo = std::make_unique<falco::outputs::output_syslog>();
}
#endif
#if !defined(_WIN32) && !defined(__EMSCRIPTEN__) && !defined(MINIMAL_BUILD)
#if defined(__linux__) && !defined(__EMSCRIPTEN__) && !defined(MINIMAL_BUILD)
else if(oc.name == "http") {
oo = std::make_unique<falco::outputs::output_http>();
}