diff options
author | Zack Weinberg <zackw@panix.com> | 2016-07-13 15:20:29 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2016-08-29 19:37:23 -0400 |
commit | 3d36fc16d07f8685861a1c80c49c3116889e88d0 (patch) | |
tree | 3b83f1f626831a5485f23c756c23d9b42c08ca68 | |
parent | a80384407bf73f4dfd1a7ff9034e957a4a2466c9 (diff) | |
download | glibc-3d36fc16d07f8685861a1c80c49c3116889e88d0.tar.gz |
Installed-header hygiene (BZ#20366): struct ifreq.
It's unclear to me whether this is the right change, or whether
instead net/if.h's definition of struct ifreq should be unconditional.
This has the smaller set of side effects.
net/if_ppp.h declares itself to be 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.
* 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.
-rw-r--r-- | sysdeps/mach/hurd/net/if_ppp.h | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/net/if_ppp.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/net/if_ppp.h b/sysdeps/mach/hurd/net/if_ppp.h index b210d7fd06..8ee620bd03 100644 --- a/sysdeps/mach/hurd/net/if_ppp.h +++ b/sysdeps/mach/hurd/net/if_ppp.h @@ -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. diff --git a/sysdeps/unix/sysv/linux/net/if_ppp.h b/sysdeps/unix/sysv/linux/net/if_ppp.h index 9994982fc0..31a20766f0 100644 --- a/sysdeps/unix/sysv/linux/net/if_ppp.h +++ b/sysdeps/unix/sysv/linux/net/if_ppp.h @@ -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. |