1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

hurd: Fix getifaddrs' and freeifaddrs' symbol exposition

from `freeaddrinfo'.

`getifaddrs' and `freeifaddrs' are not in POSIX, they should not be
exposed along `freeaddrinfo' (through `__check_pf') which is POSIX.

	* include/ifaddrs.h (__getifaddrs, __freeifaddrs): New declarations,
	and use libc_hidden_def on them.
	* inet/ifaddrs.c (__getifaddrs, __freeifaddrs): Use libc_hidden_def on
	them.
	* sysdeps/gnu/ifaddrs.c (__getifaddrs, __freeifaddrs): Likewise.
	* inet/check_pf.c (__check_pf): Use __getifaddrs and __freeifaddrs
	instead of getifaddrs and freeifaddrs.
This commit is contained in:
Samuel Thibault
2017-09-28 00:19:18 +02:00
parent 64a4af28a6
commit 4009ddc692
5 changed files with 18 additions and 2 deletions

View File

@ -32,7 +32,7 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6,
/* Get the interface list via getifaddrs. */
struct ifaddrs *ifa = NULL;
if (getifaddrs (&ifa) != 0)
if (__getifaddrs (&ifa) != 0)
{
/* We cannot determine what interfaces are available. Be
pessimistic. */
@ -51,7 +51,7 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6,
else if (runp->ifa_addr->sa_family == PF_INET6)
*seen_ipv6 = true;
(void) freeifaddrs (ifa);
(void) __freeifaddrs (ifa);
}