1
0
Fork 0
mirror of git://sourceware.org/git/glibc.git synced 2025-03-06 20:58:33 +01:00
glibc/include/ifreq.h
H.J. Lu b4744101f3 Hide internal __ifreq function [BZ ]
Hide internal __ifreq function to allow direct access within libc.so and
libc.a without using GOT nor PLT.

	[BZ ]
	* include/ifreq.h: New file.
	* sysdeps/generic/ifreq.h (__if_nextreq): Removed.
	(__ifreq): Likewise.
	* sysdeps/mach/hurd/ifreq.h (__if_nextreq): Removed.
	(__ifreq): Likewise.
2017-10-01 17:35:46 -07:00

14 lines
359 B
C

#include_next <ifreq.h>
static inline struct ifreq *
__if_nextreq (struct ifreq *ifr)
{
#ifdef _HAVE_SA_LEN
if (ifr->ifr_addr.sa_len > sizeof ifr->ifr_addr)
return (struct ifreq *) ((char *) &ifr->ifr_addr + ifr->ifr_addr.sa_len);
#endif
return ifr + 1;
}
extern void __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
attribute_hidden;