From 2fda87160cbca82053de57c6d263e650975457d8 Mon Sep 17 00:00:00 2001 From: Sitsofe Wheeler Date: Sat, 7 Sep 2013 00:17:48 +0100 Subject: [PATCH] Fix compilation on OS X OS X doesn't implement SOL_TCP so workaround this the same way as on FreeBSD/Solaris. --- README | 1 + lib/socket.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README b/README index 183248e..eb8adde 100644 --- a/README +++ b/README @@ -159,6 +159,7 @@ Libiscsi has been tested on: * Windows (Win7-VisualStudio10) * OpenSolaris * Solaris 11 : Use "gmake" to build. +* OS X RELEASE TARBALLS ================ diff --git a/lib/socket.c b/lib/socket.c index 6fbac80..468af32 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -129,7 +129,7 @@ int set_tcp_sockopt(int sockfd, int optname, int value) { int level; - #if defined(__FreeBSD__) || defined(__sun) + #if defined(__FreeBSD__) || defined(__sun) || (defined(__APPLE__) && defined(__MACH__)) struct protoent *buf; if ((buf = getprotobyname("tcp")) != NULL)