Re: AIX 4.3 getaddrinfo busted

From: Christopher Browne <cbbrowne(at)gmail(dot)com>
To: Andrew Chernow <ac(at)esilo(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: AIX 4.3 getaddrinfo busted
Date: 2009-01-23 14:22:10
Message-ID: d6d6637f0901230622m64e24cebo6f36050db92111b0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 23, 2009 at 9:18 AM, Andrew Chernow <ac(at)esilo(dot)com> wrote:
> 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 idea how 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 busted on 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.

FYI: There are AIX 5.3 nodes on BuildFarm - if the change is a
regression, it will be noticed :-).

--
http://linuxfinances.info/info/linuxdistributions.html
George Burns - "You can't help getting older, but you don't have to get old."

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-01-23 14:28:41 Re: Controlling hot standby
Previous Message Bruce Momjian 2009-01-23 14:21:42 Re: AIX 4.3 getaddrinfo busted