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;
#endif
                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;
           };
       };

(via http://unixhelp.ed.ac.uk/CGI/man-cgi?netdevice+7)

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).

merlin

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to