diff --git a/userspace/falco/app/actions/start_webserver.cpp b/userspace/falco/app/actions/start_webserver.cpp index 45ed980f..fdc8533e 100644 --- a/userspace/falco/app/actions/start_webserver.cpp +++ b/userspace/falco/app/actions/start_webserver.cpp @@ -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(); } diff --git a/userspace/falco/app/state.h b/userspace/falco/app/state.h index 85b96e40..e7d3ae33 100644 --- a/userspace/falco/app/state.h +++ b/userspace/falco/app/state.h @@ -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 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 diff --git a/userspace/falco/falco_outputs.cpp b/userspace/falco/falco_outputs.cpp index 319de301..aed55e19 100644 --- a/userspace/falco/falco_outputs.cpp +++ b/userspace/falco/falco_outputs.cpp @@ -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(); } #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(); }