@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $ PostgreSQL : pgsql / src / backend / libpq / ip . c , v 1.32 .2 .1 2005 / 11 / 22 18 : 23 : 09 momjian Exp $
* $ PostgreSQL : pgsql / src / backend / libpq / ip . c , v 1.32 .2 .2 2006 / 10 / 19 17 : 26 : 37 tgl Exp $
*
*
* This file and the IPV6 implementation were initially provided by
* This file and the IPV6 implementation were initially provided by
* Nigel Kukard < nkukard @ lbsd . net > , Linux Based Systems Design
* Nigel Kukard < nkukard @ lbsd . net > , Linux Based Systems Design
@ -75,6 +75,15 @@ pg_getaddrinfo_all(const char *hostname, const char *servname,
return getaddrinfo_unix ( servname , hintp , result ) ;
return getaddrinfo_unix ( servname , hintp , result ) ;
# endif
# endif
# ifdef _AIX
/*
* It seems AIX ' s getaddrinfo doesn ' t reliably zero sin_port when servname
* is NULL , so force the issue .
*/
if ( servname = = NULL )
servname = " 0 " ;
# endif
/* NULL has special meaning to getaddrinfo(). */
/* NULL has special meaning to getaddrinfo(). */
return getaddrinfo ( ( ! hostname | | hostname [ 0 ] = = ' \0 ' ) ? NULL : hostname ,
return getaddrinfo ( ( ! hostname | | hostname [ 0 ] = = ' \0 ' ) ? NULL : hostname ,
servname , hintp , result ) ;
servname , hintp , result ) ;