AIX 4.3 getaddrinfo busted - Mailing list pgsql-hackers

From Andrew Chernow
Subject AIX 4.3 getaddrinfo busted
Date
Msg-id 4979D1C8.5050602@esilo.com
Whole thread Raw
Responses Re: AIX 4.3 getaddrinfo busted  (Bruce Momjian <bruce@momjian.us>)
Re: AIX 4.3 getaddrinfo busted  (Christopher Browne <cbbrowne@gmail.com>)
List pgsql-hackers
AIX 4.3 was released in late 1999, so I thought it was worth mentioning.  I only have AIX 4.3 and 6.1, so I have no
ideahow AIX 5 handles this.  AIX 6.1 works fine.
 

Anyways, the service argument to getaddrinfo is busted on AIX 4.3, thus  src/backend/libpq/ip.c pg_getaddrinfo_all() is
bustedon this 
 
platform.  It fails with EAI_NODATA "Host not found".   If this argument 
is left NULL, everything works.

I can supply a patch to fix this.  My suggestion would be to always 
supply a NULL service to getaddrinfo.  After a successful call, set the 
port if it was provided ... htons((unsigned short)atoi(servname)).  This 
approach avoids a configure check.

-- 
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [PATCH] reloptions - RELOPT_KIND_ALL
Next
From: Bruce Momjian
Date:
Subject: Re: AIX 4.3 getaddrinfo busted