[3b/6] Installed-header hygiene (BZ#20366): struct ether_addr.

Message ID 20160922133054.22210-10-zackw@panix.com
State Superseded
Headers

Commit Message

Zack Weinberg Sept. 22, 2016, 1:30 p.m. UTC
  Some versions of netinet/if_ether.h only define struct ether_addr when
__USE_MISC.  This breaks function prototypes in netinet/ether.h that
depend on it.  The path of least resistance is to condition those
declarations on __USE_MISC too.

	* inet/netinet/ether.h: Condition all function prototypes
        on __USE_MISC, to ensure struct ether_addr is declared.
---
 inet/netinet/ether.h | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/inet/netinet/ether.h b/inet/netinet/ether.h
index 3dff523..0952b23 100644
--- a/inet/netinet/ether.h
+++ b/inet/netinet/ether.h
@@ -24,6 +24,7 @@ 
 /* Get definition of `struct ether_addr'.  */
 #include <netinet/if_ether.h>
 
+#ifdef __USE_MISC
 __BEGIN_DECLS
 
 /* Convert 48 bit Ethernet ADDRess to ASCII.  */
@@ -49,5 +50,6 @@  extern int ether_line (const char *__line, struct ether_addr *__addr,
 		       char *__hostname) __THROW;
 
 __END_DECLS
+#endif /* Use misc.  */
 
 #endif /* netinet/ether.h */