From b5c18d985fe87579341453a19688c6adeee28b8f Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Tue, 17 Oct 2023 13:22:12 +0900 Subject: [PATCH] in_node_exporter_metrics: Fix macOS build (#8048) To build on macOS, we have to provide skeleton functions which are not targeted OSes. Signed-off-by: Hiroshi Hatake --- .../in_node_exporter_metrics/ne_processes.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/plugins/in_node_exporter_metrics/ne_processes.h b/plugins/in_node_exporter_metrics/ne_processes.h index 05514bd4bf0..d5108c868b2 100644 --- a/plugins/in_node_exporter_metrics/ne_processes.h +++ b/plugins/in_node_exporter_metrics/ne_processes.h @@ -22,8 +22,26 @@ #include "ne.h" +#ifdef __linux__ int ne_processes_init(struct flb_ne *ctx); int ne_processes_update(struct flb_ne *ctx); int ne_processes_exit(struct flb_ne *ctx); +#else +static int ne_processes_init(struct flb_ne *ctx) +{ + return 0; +} + +static int ne_processes_update(struct flb_ne *ctx) +{ + return 0; +} + +static int ne_processes_exit(struct flb_ne *ctx) +{ + return 0; +} + +#endif #endif