From 67bdd80a96bdfc49d1aadbd32cca2b53f123d180 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 15 Jan 2017 17:56:11 +0100 Subject: stats: Disable stats*.c on embedded targets Change-Id: I6beb4fcc394ed7d3f8dd7a097b6e998245ecf401 --- include/osmocom/core/stats.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/osmocom') diff --git a/include/osmocom/core/stats.h b/include/osmocom/core/stats.h index f754e41d..09b836ab 100644 --- a/include/osmocom/core/stats.h +++ b/include/osmocom/core/stats.h @@ -19,7 +19,15 @@ */ #pragma once +/* a bit of a crude way to disable building/using this on (bare iron) + * embedded systems. We cannot use the autoconf-defined HAVE_... macros + * here, as that only works at library compile time, not at application + * compile time */ +#ifdef unix + #include +#include + #include #include @@ -119,3 +127,5 @@ int osmo_stats_reporter_send(struct osmo_stats_reporter *srep, const char *data, int osmo_stats_reporter_send_buffer(struct osmo_stats_reporter *srep); int osmo_stats_reporter_udp_open(struct osmo_stats_reporter *srep); int osmo_stats_reporter_udp_close(struct osmo_stats_reporter *srep); + +#endif /* unix */ -- cgit v1.2.3