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

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

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Cc: Andrew Chernow <achernow(at)esilo(dot)com>
Subject: compile error via SIOCGLIFCONF from ip.c on hpux-11
Date: 2010-11-29 18:19:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
PostgreSQL 9 is breaking for me on line 654 of ip.c.  ip.c is checking
on presence SIOCGLIFCONF to determine if it's ok to use linux method
of polling if addrs etc over ioctl, which is not enough. hpux provides
this method in similar fashion, but the structs are named different,
and have different members.

for example, we have:
struct  if_laddrreq {
        char    iflr_name[IF_NAMESIZE];            /* if name, e.g. "lan0" */
        union {
                struct  sockaddr_ext iflru_addr;
                struct  sockaddr_ext iflru_dstaddr;
                int     iflru_flags;
#if defined(__STDC_EXT__) || defined(__LP64__)
                uint64_t iflru_xflags;
                int     iflru_metric;
                struct  iflife  iflru_lifetimes;
                caddr_t iflru_data;
                unsigned char  __iflru_padding[32]; /* alignment for 32/64bit*/
        } iflr_iflru;

which is similar to
       struct ifreq {
	   char ifr_name[IFNAMSIZ]; /* Interface name */
	   union {
	       struct sockaddr ifr_addr;
	       struct sockaddr ifr_dstaddr;
	       struct sockaddr ifr_broadaddr;
	       struct sockaddr ifr_netmask;
	       struct sockaddr ifr_hwaddr;
	       short	       ifr_flags;
	       int	       ifr_ifindex;
	       int	       ifr_metric;
	       int	       ifr_mtu;
	       struct ifmap    ifr_map;
	       char	       ifr_slave[IFNAMSIZ];
	       char	       ifr_newname[IFNAMSIZ];
	       char *	       ifr_data;


forcing the #if check of SIOCGLIFCONF to false allowed postgres to
continue and compile.  Searching the archives turned up the
samehost/samenet patch...did that break this?  was hpux checked, or is
this a version issue? (I'm testing on 11.23 Itanium).



pgsql-hackers by date

Next:From: Tom LaneDate: 2010-11-29 18:30:51
Subject: Re: PROPOSAL of xmlvalidate
Previous:From: Robert HaasDate: 2010-11-29 18:15:52
Subject: Re: PROPOSAL of xmlvalidate

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