[libosmocore PATCH 1/3] Define struct iphdr for OSX

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/OpenBSC@lists.osmocom.org/.

Tobias Engel t-openbsc at tobias.org
Wed Oct 24 15:52:51 UTC 2012


Use FreeBSD struct iphdr definition for OSX also. From the commentary in
the source file:
On BSD the IPv4 struct is called struct ip and instead of iXX
the members are called ip_XX. One could change this code to use
struct ip but that would require to define _BSD_SOURCE and that
might have other complications. Instead make sure struct iphdr
is present on FreeBSD.
---
 src/gb/gprs_ns_frgre.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gb/gprs_ns_frgre.c b/src/gb/gprs_ns_frgre.c
index 2344381..e557c7e 100644
--- a/src/gb/gprs_ns_frgre.c
+++ b/src/gb/gprs_ns_frgre.c
@@ -48,7 +48,7 @@ struct gre_hdr {
 	uint16_t ptype;
 } __attribute__ ((packed));
 
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__APPLE__)
 /**
  * On BSD the IPv4 struct is called struct ip and instead of iXX
  * the members are called ip_XX. One could change this code to use
-- 
1.7.10.2 (Apple Git-33)





More information about the OpenBSC mailing list