Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754735AbZA0KpI (ORCPT ); Tue, 27 Jan 2009 05:45:08 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752262AbZA0Kox (ORCPT ); Tue, 27 Jan 2009 05:44:53 -0500 Received: from sovereign.computergmbh.de ([85.214.69.204]:49435 "EHLO sovereign.computergmbh.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752145AbZA0Kox (ORCPT ); Tue, 27 Jan 2009 05:44:53 -0500 Date: Tue, 27 Jan 2009 11:44:51 +0100 (CET) From: Jan Engelhardt To: David Miller cc: sam@ravnborg.org, andrew@walrond.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: 2.6.28 headers break kbd and net-tools userspace builds In-Reply-To: <20090126.210835.181389836.davem@davemloft.net> Message-ID: References: <20090122175645.GA14178@uranus.ravnborg.org> <4978C301.1040705@walrond.org> <20090122191239.GA16347@uranus.ravnborg.org> <20090126.210835.181389836.davem@davemloft.net> User-Agent: Alpine 2.00 (LSU 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1752 Lines: 47 On Tuesday 2009-01-27 06:08, David Miller wrote: >> On Thu, Jan 22, 2009 at 07:03:29PM +0000, Andrew Walrond wrote: >> > $ grep -r iphdr /usr/include/ >> > >> > /usr/include/netinet/ip.h:struct iphdr >> > /usr/include/netinet/tcp.h: * This should be defined as MIN(512, IP_MSS >> > - sizeof (struct tcpiphdr)). >> > /usr/include/linux/if_tunnel.h: struct iphdr iph; >> > /usr/include/linux/ip.h:struct iphdr { >> > >> > $ grep netinet/ip.h iptunnel.c >> > >> > #include >> > >> > So linux/ip.h is clashing with glibc(2.8)'s netinet/ip.h >> >> I took a look at my netinet/ip.h and this is obviously >> the same structure. >> But I do not know what the right answer is here. >> >> This may be a general thing. Because iphdr is >> no a kernel thing, it is an IP thing. So one could argue >> that the kernel should not export it in the first place. > >The fly in the ointment is linux/if_tunnel.h > >We export a structure there for a userland interface which >uses "struct iphdr". > >Because of that, we are faced with the difficult choice between >defining the structure (as we do) in linux/ip.h or using some ugly >__KERNEL__ ifdefs in linux/if_tunnel.h to conditionally include >netinet/ip.h instead. :-/ > >Really, I have no idea what to do about this as the problem has >existed for so long. I think in the long term, exported structs should probably have a "kernel_" prefix, much like userspace libraries use such prefixes to (try to) guard against simple name clashes. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/