0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

fix OS X 10.4 32-bit buildbot hostname resolution

This commit is contained in:
Kristina Chodorow 2010-09-22 17:25:49 -04:00
parent ac505f9786
commit cef1820140

View File

@ -68,7 +68,8 @@ namespace mongo {
ss << port;
int ret = getaddrinfo(iporhost, ss.str().c_str(), &hints, &addrs);
if (ret == EAI_NONAME ){
// old C compilers on IPv6-capable hosts return EAI_NODATA error
if (ret == EAI_NONAME || ret == EAI_NODATA){
// iporhost isn't an IP address, allow DNS lookup
hints.ai_flags &= ~AI_NUMERICHOST;
ret = getaddrinfo(iporhost, ss.str().c_str(), &hints, &addrs);