Change in libosmocore[master]: stats.h: Fix build on MacOS

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Thu Dec 13 13:01:28 UTC 2018


Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/12212 )

Change subject: stats.h: Fix build on MacOS
......................................................................

stats.h: Fix build on MacOS

Otherwise struct osmo_stats_config is not defined and compiler fails.

Related: OS#3722
Change-Id: I037c3ca141ecee2d457e0a881a56e32ee24cec4d
---
M include/osmocom/core/stats.h
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Stefan Sperling: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



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_udp_open(struct osmo_stats_reporter *srep);
 int osmo_stats_reporter_udp_close(struct osmo_stats_reporter *srep);
 
-#endif /* unix */
+#endif /* unix || __APPLE__ */
 /*! @} */

-- 
To view, visit https://gerrit.osmocom.org/12212
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I037c3ca141ecee2d457e0a881a56e32ee24cec4d
Gerrit-Change-Number: 12212
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Stefan Sperling <stsp at stsp.name>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181213/23685dec/attachment.htm>


More information about the gerrit-log mailing list