From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2065 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: Re: Clash between 'netinet/if_ether.h' and 'linux/if_ether.h' Date: Tue, 9 Oct 2012 16:13:43 -0700 Message-ID: <20121009161343.7ce4fa5f.idunham@lavabit.com> References: <5073577D.5010000@embtoolkit.org> <20121008233307.GP254@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1349824438 28088 80.91.229.3 (9 Oct 2012 23:13:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Oct 2012 23:13:58 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2066-gllmg-musl=m.gmane.org@lists.openwall.com Wed Oct 10 01:14:05 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TLj01-0001Kd-4N for gllmg-musl@plane.gmane.org; Wed, 10 Oct 2012 01:14:05 +0200 Original-Received: (qmail 26263 invoked by uid 550); 9 Oct 2012 23:13:57 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 26242 invoked from network); 9 Oct 2012 23:13:57 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=fiMMr0vI7OqkiGDLCqex9FcrFilOs4pfOJYuRC/PoKlGaU8XG2GjJeT48kCz9dE4tstytyl65f+BBBNfb9md4FvVG9QJdz+a+MjN9EKl98rGQPtigH0wEVtSjxzQLVP50Gu8H40Af1Jh9O40FamR25eJndk7Okr4DwxKS4zfag4=; h=Date:From:To:Subject:Message-Id:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; In-Reply-To: <20121008233307.GP254@brightrain.aerifal.cx> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; i486-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:2065 Archived-At: On Mon, 8 Oct 2012 19:33:07 -0400 Rich Felker wrote: > On Tue, Oct 09, 2012 at 12:45:17AM +0200, Abdoulaye Walsimou GAYE wrote: > > Hello, > > While trying to compile busybox-1.20.2, the following issue raised: > > > > CC networking/ifplugd.o > > In file included from /home/walsimou/embtoolkit.git/sysroot-armel-linux-arm920t/usr/include/net/ethernet.h:10:0, > > from networking/ifplugd.c:41: > > /home/walsimou/embtoolkit.git/sysroot-armel-linux-arm920t/usr/include/netinet/if_ether.h:75:8: error: redefinition of 'struct ethhdr' > > /home/walsimou/embtoolkit.git/sysroot-armel-linux-arm920t/usr/include/linux/if_ether.h:127:8: note: originally defined here > > > > Note that uClibc strategy here is to include linux/if_ether.h > > It's a bug to be including linux/if_ether.h, and there's no way to > work around this without depending on kernel headers, which musl will Patch that does work around it: -#ifndef _NETINET_IF_ETHER_H +/* Check for - _LINUX_IF_ETHER_H will also work */ +#if !defined(_NETINET_IF_ETHER_H) || !defined(ETH_ALEN) #define _NETINET_IF_ETHER_H +#define _LINUX_IF_ETHER_H /* linux/if_ether.h defines the same stuff */ #include #include Not really clean, but all that an application can rely on getting from either header can be found in the other: on my install, the content of linux/if_ether.h is exactly the same except it uses kernel types. -- Isaac Dunham