Fix compilation on OS X

OS X doesn't implement SOL_TCP so workaround this the same way as on
FreeBSD/Solaris.
This commit is contained in:
Sitsofe Wheeler
2013-09-07 00:17:48 +01:00
parent 45a3752d16
commit 2fda87160c
2 changed files with 2 additions and 1 deletions

1
README
View File

@@ -159,6 +159,7 @@ Libiscsi has been tested on:
* Windows (Win7-VisualStudio10)
* OpenSolaris
* Solaris 11 : Use "gmake" to build.
* OS X
RELEASE TARBALLS
================

View File

@@ -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)