Skip to content

Commit c15ed8b

Browse files
committed
raw
1 parent eeaf525 commit c15ed8b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

contrib/pg_exchange/nodeDistPlanExec.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,10 +706,14 @@ get_hostname(const char *sipaddr)
706706
char *hostname;
707707
struct addrinfo hintp;
708708
struct addrinfo *result;
709-
710709
struct sockaddr_storage saddr;
711710
int res;
712711

712+
MemSet(&hintp, 0, sizeof(hintp));
713+
hintp.ai_socktype = SOCK_STREAM;
714+
hintp.ai_family = AF_UNSPEC;
715+
hintp.ai_flags = AI_ALL;
716+
713717
if ((res = pg_getaddrinfo_all(sipaddr, NULL, &hintp, &result)) != 0)
714718
elog(FATAL, "Cannot resolve network address %s, error=%d.", sipaddr, res);
715719
memcpy(&saddr, result->ai_addr, result->ai_addrlen);

0 commit comments

Comments
 (0)