From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2067 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 17:08:14 -0700 Message-ID: <20121009170814.1df8e187.idunham@lavabit.com> References: <5073577D.5010000@embtoolkit.org> <20121008233307.GP254@brightrain.aerifal.cx> <20121009161343.7ce4fa5f.idunham@lavabit.com> <20121009231553.GQ254@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 1349827708 19970 80.91.229.3 (10 Oct 2012 00:08:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Oct 2012 00:08:28 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2068-gllmg-musl=m.gmane.org@lists.openwall.com Wed Oct 10 02:08:35 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 1TLjqj-0000Ba-SV for gllmg-musl@plane.gmane.org; Wed, 10 Oct 2012 02:08:33 +0200 Original-Received: (qmail 32133 invoked by uid 550); 10 Oct 2012 00:08:27 -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 32125 invoked from network); 10 Oct 2012 00:08:27 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=oPzjwTyqy/stRYXlhPBOnwuuDa+mUvzfeiG1Hh0FADhaux2/6TvI88JDJoiJyvNkglDMKNy2Y4KcH9MYIa9mW/VmtoYyEbN44QQeahqI4gjkmSsRqvqmMAKAoIR4WttvplPT5c8g+WzyYgJJrjs8PeT3g35jfuB7RStWshUJvlI=; h=Date:From:To:Subject:Message-Id:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; In-Reply-To: <20121009231553.GQ254@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:2067 Archived-At: On Tue, 9 Oct 2012 19:15:53 -0400 Rich Felker wrote: > On Tue, Oct 09, 2012 at 04:13:43PM -0700, Isaac Dunham wrote: > > > 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 */ > > That is a clever workaround, but the way it's written it breaks > include-guard heuristics. Instead, it should be.. > > #ifndef _NETINET_IF_ETHER_H > #define _NETINET_IF_ETHER_H > > #ifndef ETH_ALEN > ... > #endif > > #endif > > But does it work the other way around, i.e. if is > included first? That's what the second change is for: > > +#define _LINUX_IF_ETHER_H /* linux/if_ether.h defines the same stuff */ > I'd still rather just press upstream to fix this stupid bug if we can. > This is the kind of thing that only affects a small number of broken > applications, and as such, I really question whether it merits ugly > workarounds. Agreed. I mainly mentioned that because I take "*can't* do without " as a challenge. -- Isaac Dunham