From eff9064898cba9b8bf9495122063f780a5b3314c Mon Sep 17 00:00:00 2001 From: Riza Sulistyo Date: Fri, 8 Sep 2023 23:25:56 +0700 Subject: [PATCH] Update addr_resolv_sock.c --- pjlib/src/pj/addr_resolv_sock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pjlib/src/pj/addr_resolv_sock.c b/pjlib/src/pj/addr_resolv_sock.c index e40fe633ea..9b3fbf348a 100644 --- a/pjlib/src/pj/addr_resolv_sock.c +++ b/pjlib/src/pj/addr_resolv_sock.c @@ -178,6 +178,9 @@ PJ_DEF(pj_status_t) pj_getaddrinfo(int af, const pj_str_t *nodename, /* Call getaddrinfo() */ pj_bzero(&hint, sizeof(hint)); hint.ai_family = af; + if (af == PJ_AF_INET6) { + hint.ai_flags = AI_V4MAPPED | AI_ALL; + } /* Zero value of ai_socktype means the implementation shall attempt * to resolve the service name for all supported socket types */ hint.ai_socktype = 0;