Skip to contentSkip to conversation

Define SOL_IP if compiling on OSX

PATCH New David Sommerseth 1 participant 1 message Aug 26, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Define SOL_IP if compiling on OSX

OSX Lion does not have SOL_IP defined. If compiling on TARGET_DARWIN and SOL_IP is not defined, make it the same as IPPROTO_IP. This patch is based upon a patch in the MacPorts bug tracker.

Reference: https://trac.macports.org/ticket/30253

---
 syshead.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
syshead.h +4 -0
index 87cc369..c25fe38 100644
@@ -390,6 +390,10 @@
 #define EXTENDED_SOCKET_ERROR_CAPABILITY 0
 #endif
 
+#if defined(TARGET_DARWIN) && !defined(SOL_IP)
+#define SOL_IP IPPROTO_IP  /* SOL_IP is not defined on OSX Lion */
+#endif /* TARGET_DARWIN && !SOL_IP */
+
 /*
  * Does this platform support linux-style IP_PKTINFO
  * or bsd-style IP_RECVDSTADDR ?
Signature · 1 line
1.7.4.4