Skip to content

Commit

Permalink
Update to Csocket 6da41d3
Browse files Browse the repository at this point in the history
Fixes build on OS X.
  • Loading branch information
Stéphan Kochen committed Jan 15, 2012
1 parent 10ece5d commit 4bb365c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Csocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,15 +437,16 @@ int GetAddrInfo( const CS_STRING & sHostname, Csock *pSock, CSSockAddr & csSockA
if( pSock )
pSock->SetIPv6( false );
csSockAddr.SetIPv6( false );
if( __GetHostByName( sHostname, csSockAddr.GetAddr(), 3 ) == 0 )
return( 0 );
#endif /* USE_GETHOSTBYNAME */
int iRet = __GetHostByName( sHostname, csSockAddr.GetAddr(), 3 );
return( iRet );
#else
CGetAddrInfo cInfo( sHostname, pSock, csSockAddr );
cInfo.Init();
int iRet = cInfo.Process();
if( iRet != 0 )
return( iRet );
return( cInfo.Finish() );
#endif /* USE_GETHOSTBYNAME */
}

int Csock::ConvertAddress( const struct sockaddr_storage * pAddr, socklen_t iAddrLen, CS_STRING & sIP, u_short * piPort )
Expand Down Expand Up @@ -583,7 +584,7 @@ static const char * CS_StrError( int iErrno, char * pszBuff, size_t uBuffLen )
return( strerror( iErrno ) );
#else
memset( pszBuff, '\0', uBuffLen );
#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !defined( _GNU_SOURCE )
#if !defined( _GNU_SOURCE )
if( strerror_r( iErrno, pszBuff, uBuffLen ) == 0 )
return( pszBuff );
#else
Expand Down

0 comments on commit 4bb365c

Please sign in to comment.