From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1034 Path: news.gmane.org!not-for-mail From: orc Newsgroups: gmane.linux.lib.musl.general Subject: Re: linux/if_ether.h: struct ethhdr previously defined in netinet/if_ether.h Date: Sat, 9 Jun 2012 14:51:48 +0800 Message-ID: <20120609145148.2cb4358f@sibserver.ru> References: <20120609030449.1013330b@sibserver.ru> <20120608221929.GV163@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: dough.gmane.org 1339224833 12366 80.91.229.3 (9 Jun 2012 06:53:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 9 Jun 2012 06:53:53 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1035-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jun 09 08:53:52 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 1SdFYQ-0006Kx-Gz for gllmg-musl@plane.gmane.org; Sat, 09 Jun 2012 08:53:46 +0200 Original-Received: (qmail 23734 invoked by uid 550); 9 Jun 2012 06:53:45 -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 23717 invoked from network); 9 Jun 2012 06:53:41 -0000 In-Reply-To: <20120608221929.GV163@brightrain.aerifal.cx> X-Mailer: claws-mail Xref: news.gmane.org gmane.linux.lib.musl.general:1034 Archived-At: On Fri, 8 Jun 2012 18:19:29 -0400 Rich Felker wrote: > On Sat, Jun 09, 2012 at 03:04:49AM +0800, orc wrote: > > Getting this when compiling tinc-1.0.18: > > > > In file included from /usr/include/linux/if_tun.h:20, > > from device.c:24: > > /usr/include/linux/if_ether.h:126: error: redefinition of 'struct > > ethhdr' make[2]: *** [device.o] Error 1 > > > > Commenting struct ethhdr definition in netinet/if_ether.h solves the > > problem. > > I'm not sure how this stuff is intended to work with other libcs, but > generally it's an error to be including both kernel headers and > userspace headers that involve the same stuff in the same source > file... > > And it's probably bad design to be including linux/*.h at all... > > Rich Yes, but it includes other header missing in userspace (linux/if_tun.h) for specific feature, which includes linux/if_ether.h and fails due to already included netinet/if_ether.h. glibc2's if_ether.h just sucks definitions from linux/if_ether.h