about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--include/ifreq.h14
-rw-r--r--sysdeps/generic/ifreq.h12
-rw-r--r--sysdeps/mach/hurd/ifreq.h12
4 files changed, 23 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index ad10a7a135..7514e861dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,15 @@
 2017-10-01  H.J. Lu  <hongjiu.lu@intel.com>
 
 	[BZ #18822]
+	* 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  H.J. Lu  <hongjiu.lu@intel.com>
+
+	[BZ #18822]
 	* include/idna.h: New file.
 	* inet/getnameinfo.c: Include <idna.h> instead of
 	<libidn/idna.h>.
diff --git a/include/ifreq.h b/include/ifreq.h
new file mode 100644
index 0000000000..94e984c73c
--- /dev/null
+++ b/include/ifreq.h
@@ -0,0 +1,14 @@
+#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;
diff --git a/sysdeps/generic/ifreq.h b/sysdeps/generic/ifreq.h
index 6ebd7c83f3..b39739debb 100644
--- a/sysdeps/generic/ifreq.h
+++ b/sysdeps/generic/ifreq.h
@@ -23,18 +23,6 @@
 #include <sys/socket.h>
 #include <sys/ioctl.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);
-
 
 static inline void
 __if_freereq (struct ifreq *ifreqs, int num_ifs)
diff --git a/sysdeps/mach/hurd/ifreq.h b/sysdeps/mach/hurd/ifreq.h
index eceeb7a2c3..3dd17f773d 100644
--- a/sysdeps/mach/hurd/ifreq.h
+++ b/sysdeps/mach/hurd/ifreq.h
@@ -24,18 +24,6 @@
 #include <sys/ioctl.h>
 #include <sys/mman.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);
-
 
 static inline void
 __if_freereq (struct ifreq *ifreqs, int num_ifs)