Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sat, 9 Jun 2012 14:51:48 +0800
From: orc <orc@...server.ru>
To: musl@...ts.openwall.com
Subject: Re: linux/if_ether.h: struct ethhdr previously defined in
 netinet/if_ether.h

On Fri, 8 Jun 2012 18:19:29 -0400
Rich Felker <dalias@...ifal.cx> 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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.