Browse Source

HPCC-18111 Stand alone eclcc delay calling gethostbyname

Not been able to reproduce the oiginal problem, but a bit of research suggests
that we this should help. At least in my testing it does not make anything any
worse!

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 years ago
parent
commit
4c4cee0fa6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      system/jlib/jsocket.cpp

+ 2 - 2
system/jlib/jsocket.cpp

@@ -3071,7 +3071,7 @@ static bool lookupHostAddress(const char *name,unsigned *netaddr)
     // if IP4only or using MS V6 can only resolve IPv4 using 
     static bool recursioncheck = false; // needed to stop error message recursing
     unsigned retry=10;
-#if defined(__linux__) || defined(getaddrinfo)
+#if defined(__linux__) || defined (__APPLE__) ||defined(getaddrinfo)
     if (IP4only) {
 #else
     {
@@ -3116,7 +3116,7 @@ static bool lookupHostAddress(const char *name,unsigned *netaddr)
         }
         return false;
     }
-#if defined(__linux__) || defined(getaddrinfo)
+#if defined(__linux__) || defined (__APPLE__) || defined(getaddrinfo)
     struct addrinfo hints;
     memset(&hints,0,sizeof(hints));
     struct addrinfo  *addrInfo = NULL;