Bladeren bron

Fix #2318 on macOS

yhirose 1 maand geleden
bovenliggende
commit
8d03ef1615
1 gewijzigde bestanden met toevoegingen van 1 en 0 verwijderingen
  1. 1 0
      httplib.h

+ 1 - 0
httplib.h

@@ -4547,6 +4547,7 @@ inline int getaddrinfo_with_timeout(const char *node, const char *service,
 
   return ret;
 #elif TARGET_OS_MAC
+  if (!node) { return EAI_NONAME; }
   // macOS implementation using CFHost API for asynchronous DNS resolution
   CFStringRef hostname_ref = CFStringCreateWithCString(
       kCFAllocatorDefault, node, kCFStringEncodingUTF8);