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:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user