aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/core
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-12-10 10:59:13 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-12-13 13:01:28 +0000
commit2bf01d439cbbf346c333043ec0c82e6d5ef62ee2 (patch)
tree5498b3eafaa8604579e97468b759910fd1f0a9f1 /include/osmocom/core
parentdb038255eb1a2ff1a026b6c1ecd7328c22242985 (diff)
stats.h: Fix build on MacOS
Otherwise struct osmo_stats_config is not defined and compiler fails. Related: OS#3722 Change-Id: I037c3ca141ecee2d457e0a881a56e32ee24cec4d
Diffstat (limited to 'include/osmocom/core')
-rw-r--r--include/osmocom/core/stats.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/osmocom/core/stats.h b/include/osmocom/core/stats.h
index e4d46ba..e01016d 100644
--- a/include/osmocom/core/stats.h
+++ b/include/osmocom/core/stats.h
@@ -28,7 +28,7 @@
* 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
+#if defined(unix) || defined(__APPLE__)
#include <sys/socket.h>
#include <arpa/inet.h>
@@ -141,5 +141,5 @@ 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 */
+#endif /* unix || __APPLE__ */
/*! @} */