diff --git a/Csocket.cpp b/Csocket.cpp index a4a1243c..18a82ce4 100644 --- a/Csocket.cpp +++ b/Csocket.cpp @@ -1849,7 +1849,7 @@ int Csock::DNSLookup( EDNSLType eDNSLType ) return( EAGAIN ); #else - int iRet; + int iRet = ETIMEDOUT; if ( eDNSLType == DNS_VHOST ) { if( !GetIPv6() ) diff --git a/Csocket.h b/Csocket.h index f4fd3e00..077e8c23 100644 --- a/Csocket.h +++ b/Csocket.h @@ -154,7 +154,18 @@ public: m_saddr.sin_port = htons( iPort ); } - void SetIPv6( bool b ) { m_bIsIPv6 = b; } + void SetIPv6( bool b ) + { +#ifndef HAVE_IPV6 + if( b ) + { + CS_DEBUG( "-DHAVE_IPV6 must be set during compile time to enable this feature" ); + m_bIsIPv6 = false; + return; + } +#endif /* HAVE_IPV6 */ + m_bIsIPv6 = b; + } bool GetIPv6() const { return( m_bIsIPv6 ); }