appears that sun/solaris has a broken implementation of getaddrinfo

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@711 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
imaginos
2006-03-24 23:04:07 +00:00
parent 561360ada3
commit 577d7528a7
+4 -1
View File
@@ -57,8 +57,11 @@ int GetAddrInfo( const CS_STRING & sHostname, Csock *pSock, CSSockAddr & csSockA
bool bFoundEntry = false;
for( struct addrinfo *pRes = res; pRes; pRes = pRes->ai_next )
{
#ifdef __sun
if( ( pRes->ai_socktype != SOCK_STREAM ) || ( pRes->ai_protocol != IPPROTO_TCP && pRes->ai_protocol != IPPROTO_IP ) )
#else
if( ( pRes->ai_socktype != SOCK_STREAM ) || ( pRes->ai_protocol != IPPROTO_TCP ) )
continue;
#endif /* __sun work around broken impl of getaddrinfo */
if( ( csSockAddr.GetAFRequire() != CSSockAddr::RAF_ANY ) && ( pRes->ai_family != csSockAddr.GetAFRequire() ) )
continue; // they requested a special type, so be certain we woop past anything unwanted