1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

* sysdeps/generic/ifreq.h (__if_nextreq): New function.

* sysdeps/unix/sysv/linux/ifreq.h (__if_nextreq): New function.
	* sysdeps/mach/hurd/ifreq.h (__if_nextreq): New function.
	* sysdeps/gnu/ifaddrs.c (getifaddrs): Use __if_nextreq
	for iterating through the list of interfaces.
	* resolv/res_hconf.c (_res_hconf_reorder_addrs): Likewise.

	* sysdeps/unix/grantpt.c (pts_name): Set errno when __ptsname_r fails.
	Reported by Bruno Haible <bruno@clisp.org>.
This commit is contained in:
Roland McGrath
2002-09-20 20:34:06 +00:00
parent dab9837091
commit 9db6ee8d2f
9 changed files with 58 additions and 5 deletions

View File

@ -105,6 +105,12 @@ __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
*ifreqs = realloc (ifc.ifc_buf, nifs * sizeof (struct ifreq));
}
static inline struct ifreq *
__if_nextreq (struct ifreq *ifr)
{
return ifr + 1;
}
static inline void
__if_freereq (struct ifreq *ifreqs, int num_ifs)
{