From patchwork Thu Mar 5 00:13:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland McGrath X-Patchwork-Id: 5467 Received: (qmail 10258 invoked by alias); 5 Mar 2015 00:13:05 -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 10246 invoked by uid 89); 5 Mar 2015 00:13:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: topped-with-meat.com MIME-Version: 1.0 From: Roland McGrath To: "GNU C. Library" Subject: [COMMITTED PATCH] Define ETH_ALEN in generic . Message-Id: <20150305001301.9C6382C3B7B@topped-with-meat.com> Date: Wed, 4 Mar 2015 16:13:01 -0800 (PST) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=SvUDtp+0 c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=mDV3o1hIAAAA:8 a=unBliEXgOvPCoEILv-8A:9 a=lzF-y_9Dsio35KPo:21 a=AG0OAouMjlsHBKeR:21 a=CjuIK1q_8ugA:10 This makes test-ether_line.c compile in a configuration using the generic netinet/if_ether.h file. The ether-related headers could use some further cleanup and consolidation, but this fixes the immediate problem. Thanks, Roland * sysdeps/generic/netinet/if_ether.h: Don't #include . (ETH_ALEN): New macro. (struct ether_addr): Use it for length of ether_addr_octet. --- a/sysdeps/generic/netinet/if_ether.h +++ b/sysdeps/generic/netinet/if_ether.h @@ -16,17 +16,17 @@ . */ #ifndef __NETINET_IF_ETHER_H - #define __NETINET_IF_ETHER_H 1 -#include #include +#define ETH_ALEN 6 /* Octets in one ethernet address. */ + /* This is a name for the 48 bit ethernet address available on many systems. */ struct ether_addr { - u_int8_t ether_addr_octet[6]; + u_int8_t ether_addr_octet[ETH_ALEN]; } __attribute__ ((__packed__)); #endif /* netinet/if_ether.h */