Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdbb397f

Browse files
committed
Work around reported problem that AIX's getaddrinfo() doesn't seem to zero
sin_port in the returned IP address struct when servname is NULL. This hasbeen observed to cause failure to bind the stats collection socket, andcould perhaps cause other issues too. Per reports from Brad Nicholsonand Chris Browne.
1 parent1e758d5 commitdbb397f

File tree

1 file changed

+10
-1
lines changed
  • src/backend/libpq

1 file changed

+10
-1
lines changed

‎src/backend/libpq/ip.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/libpq/ip.c,v 1.36 2006/06/20 19:56:52 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/libpq/ip.c,v 1.37 2006/10/19 17:26:32 tgl Exp $
1212
*
1313
* This file and the IPV6 implementation were initially provided by
1414
* Nigel Kukard <nkukard@lbsd.net>, Linux Based Systems Design
@@ -72,6 +72,15 @@ pg_getaddrinfo_all(const char *hostname, const char *servname,
7272
returngetaddrinfo_unix(servname,hintp,result);
7373
#endif
7474

75+
#ifdef_AIX
76+
/*
77+
* It seems AIX's getaddrinfo doesn't reliably zero sin_port when servname
78+
* is NULL, so force the issue.
79+
*/
80+
if (servname==NULL)
81+
servname="0";
82+
#endif
83+
7584
/* NULL has special meaning to getaddrinfo(). */
7685
returngetaddrinfo((!hostname||hostname[0]=='\0') ?NULL :hostname,
7786
servname,hintp,result);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp