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
Signed-off-by: David Sommerseth <dav...@redhat.com>
---
 syshead.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/syshead.h b/syshead.h
index 87cc369..c25fe38 100644
--- a/syshead.h
+++ b/syshead.h
@@ -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 ?
-- 
1.7.4.4


Reply via email to