[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090126.210835.181389836.davem@davemloft.net>
Date: Mon, 26 Jan 2009 21:08:35 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: sam@...nborg.org
Cc: andrew@...rond.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: 2.6.28 headers break kbd and net-tools userspace builds
From: Sam Ravnborg <sam@...nborg.org>
Date: Thu, 22 Jan 2009 20:12:39 +0100
> 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 <netinet/ip.h>
> >
> > 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.
>
> Added netdev..
>
> 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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists