diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-01-15 17:56:11 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-05-15 19:00:40 +0200 |
commit | 67bdd80a96bdfc49d1aadbd32cca2b53f123d180 (patch) | |
tree | f415ae817ba79707cbec87520858b64faf9ffeef /include/osmocom/core | |
parent | ac9e2d8aa52cbc4198cd94ab9d9c92c3317a979f (diff) |
stats: Disable stats*.c on embedded targets
Change-Id: I6beb4fcc394ed7d3f8dd7a097b6e998245ecf401
Diffstat (limited to 'include/osmocom/core')
-rw-r--r-- | include/osmocom/core/stats.h | 10 |
1 files changed, 10 insertions, 0 deletions
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 <sys/socket.h> +#include <arpa/inet.h> + #include <osmocom/core/linuxlist.h> #include <stdint.h> @@ -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 */ |