diff --git a/src/backend/libpq/ip.c b/src/backend/libpq/ip.c index 1897b959c8..cc6c2abac6 100644 --- a/src/backend/libpq/ip.c +++ b/src/backend/libpq/ip.c @@ -638,9 +638,15 @@ pg_foreach_ifaddr(PgIfAddrCallback callback, void *cb_data) /* * SIOCGIFCONF does not return IPv6 addresses on Solaris * and HP/UX. So we prefer SIOCGLIFCONF if it's available. + * + * On HP/UX, however, it *only* returns IPv6 addresses, + * and the structs are named slightly differently too. + * We'd have to do another call with SIOCGIFCONF to get the + * IPv4 addresses as well. We don't currently bother, just + * fall back to SIOCGIFCONF on HP/UX. */ -#if defined(SIOCGLIFCONF) +#if defined(SIOCGLIFCONF) && !defined(__hpux) /* * Enumerate the system's network interface addresses and call the callback