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:
1
README
1
README
@@ -159,6 +159,7 @@ Libiscsi has been tested on:
|
|||||||
* Windows (Win7-VisualStudio10)
|
* Windows (Win7-VisualStudio10)
|
||||||
* OpenSolaris
|
* OpenSolaris
|
||||||
* Solaris 11 : Use "gmake" to build.
|
* Solaris 11 : Use "gmake" to build.
|
||||||
|
* OS X
|
||||||
|
|
||||||
RELEASE TARBALLS
|
RELEASE TARBALLS
|
||||||
================
|
================
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ int set_tcp_sockopt(int sockfd, int optname, int value)
|
|||||||
{
|
{
|
||||||
int level;
|
int level;
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(__sun)
|
#if defined(__FreeBSD__) || defined(__sun) || (defined(__APPLE__) && defined(__MACH__))
|
||||||
struct protoent *buf;
|
struct protoent *buf;
|
||||||
|
|
||||||
if ((buf = getprotobyname("tcp")) != NULL)
|
if ((buf = getprotobyname("tcp")) != NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user