Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit40e6401

Browse files
committed
On HP/UX, the structs used by ioctl(SIOCGLIFCONF) are named differently
than on other platforms, and only IPv6 addresses are returned. Because ofthose two issues, fall back to ioctl(SIOCGIFCONF) on HP/UX, so that it atleast compiles and finds IPv4 addresses. This function is currently onlyused for interpreting samehost/samenet in pg_hba.conf, which isn't thatcritical.
1 parent54685b1 commit40e6401

File tree

1 file changed

+7
-1
lines changed
  • src/backend/libpq

1 file changed

+7
-1
lines changed

‎src/backend/libpq/ip.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,9 +638,15 @@ pg_foreach_ifaddr(PgIfAddrCallback callback, void *cb_data)
638638
/*
639639
* SIOCGIFCONF does not return IPv6 addresses on Solaris
640640
* and HP/UX. So we prefer SIOCGLIFCONF if it's available.
641+
*
642+
* On HP/UX, however, it *only* returns IPv6 addresses,
643+
* and the structs are named slightly differently too.
644+
* We'd have to do another call with SIOCGIFCONF to get the
645+
* IPv4 addresses as well. We don't currently bother, just
646+
* fall back to SIOCGIFCONF on HP/UX.
641647
*/
642648

643-
#if defined(SIOCGLIFCONF)
649+
#if defined(SIOCGLIFCONF)&& !defined(__hpux)
644650

645651
/*
646652
* Enumerate the system's network interface addresses and call the callback

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp