diff options
Diffstat (limited to 'cpp/src/Ice/Network.cpp')
-rw-r--r-- | cpp/src/Ice/Network.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index 705f32d301d..3bbe962b268 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -1371,7 +1371,14 @@ IceInternal::getAddresses(const string& host, int port, ProtocolSupport protocol } while(info == 0 && rs == EAI_AGAIN && --retry >= 0); + // In theory, getaddrinfo should only return EAI_NONAME if AI_NUMERICHOST is specified and the host name + // is not a IP address. However on some platforms (e.g. Mac OS X 10.4.x) EAI_NODATA is also returned so + // we also check for it. +#ifdef EAI_NODATA + if(!blocking && (rs == EAI_NONAME || rs == EAI_NODATA)) +#else if(!blocking && rs == EAI_NONAME) +#endif { return result; // Empty result indicates that a blocking lookup is necessary. } |