From patchwork Thu Sep 22 13:30:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zack Weinberg X-Patchwork-Id: 15900 Received: (qmail 82240 invoked by alias); 22 Sep 2016 13:31:00 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 82031 invoked by uid 89); 22 Sep 2016 13:30:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:998, __BEGIN_DECLS, __begin_decls X-HELO: l2mail1.panix.com From: Zack Weinberg To: libc-alpha@sourceware.org Cc: carlos@redhat.com, joseph@codesourcery.com Subject: [PATCH 3b/6] Installed-header hygiene (BZ#20366): struct ether_addr. Date: Thu, 22 Sep 2016 09:30:50 -0400 Message-Id: <20160922133054.22210-10-zackw@panix.com> In-Reply-To: <20160922133054.22210-9-zackw@panix.com> References: <20160922133054.22210-1-zackw@panix.com> <20160922133054.22210-2-zackw@panix.com> <20160922133054.22210-3-zackw@panix.com> <20160922133054.22210-4-zackw@panix.com> <20160922133054.22210-5-zackw@panix.com> <20160922133054.22210-6-zackw@panix.com> <20160922133054.22210-7-zackw@panix.com> <20160922133054.22210-8-zackw@panix.com> <20160922133054.22210-9-zackw@panix.com> MIME-Version: 1.0 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(+) 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 +#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 */