[3a/6] Installed-header hygiene (BZ#20366): struct ifreq.
Commit Message
net/if_ppp.h declares a couple of structures that require struct
ifreq, which is only declared by net/if.h under __USE_MISC, so they
too should be conditionally declared.
Comments in net/if_ppp.h say that it's imported from an external
source, but that last happened in 1996 so I think it's probably a dead
letter.
The Linux and Hurd versions of this file are identical, perhaps
they should be un-sysdep-ified. (And there is no generic version!)
* sysdeps/mach/hurd/net/if_ppp.h
* sysdeps/unix/sysv/linux/net/if_ppp.h:
Only define struct ifpppstatsreq and struct ifpppcstatsreq
if __USE_MISC is defined.
---
sysdeps/mach/hurd/net/if_ppp.h | 3 +++
sysdeps/unix/sysv/linux/net/if_ppp.h | 3 +++
2 files changed, 6 insertions(+)
@@ -119,6 +119,8 @@ struct ppp_option_data {
int transmit;
};
+/* 'struct ifreq' is only available from net/if.h under __USE_MISC. */
+#ifdef __USE_MISC
struct ifpppstatsreq {
struct ifreq b;
struct ppp_stats stats; /* statistic information */
@@ -131,6 +133,7 @@ struct ifpppcstatsreq {
#define ifr__name b.ifr_ifrn.ifrn_name
#define stats_ptr b.ifr_ifru.ifru_data
+#endif
/*
* Ioctl definitions.
@@ -118,6 +118,8 @@ struct ppp_option_data {
int transmit;
};
+/* 'struct ifreq' is only available from net/if.h under __USE_MISC. */
+#ifdef __USE_MISC
struct ifpppstatsreq {
struct ifreq b;
struct ppp_stats stats; /* statistic information */
@@ -130,6 +132,7 @@ struct ifpppcstatsreq {
#define ifr__name b.ifr_ifrn.ifrn_name
#define stats_ptr b.ifr_ifru.ifru_data
+#endif
/*
* Ioctl definitions.