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: 446513 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 79FB7140187 for ; Thu, 5 Mar 2015 11:13:10 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=sourceware.org header.i=@sourceware.org header.b=aQYB7ZLX; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:from:to:subject:message-id:date; q= dns; s=default; b=Hf0m3cBXfN0XGo44tSGwbZAXPuQy/sPEzWgkf1buBL3/v6 qe1CUh5MV+Hv/jop6rfMfoWpnxPSmx5PwpQ9NzMSH6TYtHl9Degp758Hyiwbxmxt fnAmNFCJ1FCr9GvepGdlSx8xwvHsVxAUVW3U8g/rafssVO6rwCY02mgFSx8RM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:from:to:subject:message-id:date; s= default; bh=ZJF7SKKRbXJJAEs9pCJJeeBkSx8=; b=aQYB7ZLXTj/bTDIg0JEx iMv07C2saNwGXjG+nCa7gc+N9trL65QIQaRFnqstZbEwZt95PNaNZuFRlLbDU4gw a2pKF8TnoCYNGGV3f2IqYkbk6eAd61WdI6+Zg9GPZrJdJWKr6rSDnyME2506KEHz 4SkPg9rQO83WND8HI0JlT7Q= 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 */