From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4179 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: netinet/if_ether.h and linux/if_ether.h Date: Sat, 2 Nov 2013 15:34:23 -0400 Message-ID: <20131102193422.GA3003@brightrain.aerifal.cx> References: <20131102190743.GR1685@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1383420872 2208 80.91.229.3 (2 Nov 2013 19:34:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Nov 2013 19:34:32 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4183-gllmg-musl=m.gmane.org@lists.openwall.com Sat Nov 02 20:34:36 2013 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 1Vcgxw-0001Me-MS for gllmg-musl@plane.gmane.org; Sat, 02 Nov 2013 20:34:36 +0100 Original-Received: (qmail 15790 invoked by uid 550); 2 Nov 2013 19:34:36 -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 15777 invoked from network); 2 Nov 2013 19:34:36 -0000 Content-Disposition: inline In-Reply-To: <20131102190743.GR1685@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4179 Archived-At: On Sat, Nov 02, 2013 at 08:07:43PM +0100, Szabolcs Nagy wrote: > * Paul Schutte [2013-11-02 13:18:41 +0000]: > > I am trying to compile openvpn against musl and I get the following: > > > > In file included from /usr/include/linux/if_tun.h:20:0, > > from syshead.h:222, > > from base64.c:40: > > /usr/include/linux/if_ether.h:127:8: error: redefinition of 'struct ethhdr' > > /usr/include/netinet/if_ether.h:93:8: note: originally defined here > > > > yes this was reported earlier but it was not addressed > > there is no clean solution: netinet/if_ether.h should include > linux/if_ether.h so they don't conflict, but then it cannot be > used without the kernel headers > > > I can get it to work by just removing the netinet/if_ether.h part, but > > maybe it is something worthy of your attention. > > netinet/if_ether.h has additional interfaces over the linux/if_ether.h > ones, so this does not work in general I think the proper solution is just to acknowledge that kernel headers and userspace headers are generally not to be used together. In particular things like this should be split into multiple source files. If there are still too many programs that break and can't be fixed easily, maybe we can make a script that removes the conflicting definitions from kernel headers and includes the userspace (libc) headers for them. The other direction is not really acceptable because the kernel folks do not respect namespace (how would you deal with things from the kernel that should be exposed under _GNU_SOURCE but not POSIX?)... Rich