Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 8 Jun 2012 18:19:29 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: linux/if_ether.h: struct ethhdr previously defined in
 netinet/if_ether.h

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

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.