summaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-01-15 17:56:11 +0100
committerHarald Welte <laforge@gnumonks.org>2017-05-15 19:00:40 +0200
commit67bdd80a96bdfc49d1aadbd32cca2b53f123d180 (patch)
treef415ae817ba79707cbec87520858b64faf9ffeef /include/osmocom
parentac9e2d8aa52cbc4198cd94ab9d9c92c3317a979f (diff)
stats: Disable stats*.c on embedded targets
Change-Id: I6beb4fcc394ed7d3f8dd7a097b6e998245ecf401
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/core/stats.h10
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 */