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