Merge pull request #1578 from cwardcode/ipv6-support-getaddrinfo

Update getaddrinfo options to support IPv6 hostname resolution
This commit is contained in:
Ian Craggs 2025-08-14 15:13:52 +01:00 committed by GitHub
commit 87c1c56f16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1146,7 +1146,7 @@ int Socket_new(const char* addr, size_t addr_len, int port, SOCKET* sock)
sa_family_t family = AF_INET;
#endif
struct addrinfo *result = NULL;
struct addrinfo hints = {0, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP, 0, NULL, NULL, NULL};
struct addrinfo hints = {AI_ADDRCONFIG, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP, 0, NULL, NULL, NULL};
FUNC_ENTRY;
*sock = SOCKET_ERROR;