Skip site navigation (1) Skip section navigation (2)

Re: compile error via SIOCGLIFCONF from ip.c on hpux-11

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Andrew Chernow <achernow(at)esilo(dot)com>
Subject: Re: compile error via SIOCGLIFCONF from ip.c on hpux-11
Date: 2010-11-29 20:00:53
Message-ID: AANLkTinKCiLkp-2+X1qrv_5JeonwGQ=MS-n+S7px13Yt@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Mon, Nov 29, 2010 at 2:26 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Merlin Moncure <mmoncure(at)gmail(dot)com> writes:
>> How do you test this feature?
>
> Try src/tools/ifaddrs/test_ifaddrs.c.  I think the only usage in the
> core code is testing samehost/samenet matches in pg_hba.conf.

It looks like this is unfortunately more involved.  The test of my
adjustment above immediately failed with ENOENT, which you have to
expect on hpux apparently.   According to some googling (see:
http://cvsweb.netbsd.org/bsdweb.cgi/src/dist/bind/lib/isc/unix/Attic/ifiter_ioctl.c?rev=1.1.1.4.4.1&content-type=text/x-cvsweb-markup
and others), the long method returns ip6 addresses and the short
method returns ip4 addresses, and you have to do both on hpux always.

Forcing the short method, the test worked, I got the loopback and the
local address.  So we have a couple of options here: hacking the
foreach to use the short method on hpux is certainly better situation
than we have now, or fixing this 'properly', means refactoring this
file a bit and adding a configure test or leaning on an hpux macro.  I
have no way of testing the long form method I posed above -- does
anybody have an ipv6 hpux box?

merlin

In response to

pgsql-hackers by date

Next:From: Dimitri FontaineDate: 2010-11-29 20:03:06
Subject: Re: pg_execute_from_file review
Previous:From: Tom LaneDate: 2010-11-29 19:26:12
Subject: Re: compile error via SIOCGLIFCONF from ip.c on hpux-11

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group