[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#646918: /usr/include/sys/nlist_aout.h:51: error: redefinition of ���struct nlist’



reassign 646918 kfreebsd-kernel-headers
thanks

On Fri, Oct 28, 2011 at 01:40:30PM +0200, Robert Millan wrote:
> Package: libc0.1-dev
> Version: 2.11.2-10
> Severity: normal
> 
> The following code compiles on FreeBSD but not on Debian GNU/kFreeBSD:
> 
> #include <a.out.h>
> #include <sys/nlist_aout.h>
> 
> main ()
> {
>   struct nlist nl;
>   nl.n_un.n_strx = 0;
> }
> 
> It appears there are conflicting definitions of "struct nlist", one of them in
> libc-dev and the other in kfreebsd-kernel-headers:
> 
> $ gcc /tmp/test.c -o /tmp/test
> In file included from /tmp/test.c:2:
> /usr/include/sys/nlist_aout.h:51: error: redefinition of ??struct nlist??
> /tmp/test.c: In function ??main??:
> /tmp/test.c:7: error: ??struct nlist?? has no member named ??n_un??
> 

It compiles fine on plain FreeBSD because <sys/nlist_aout.h> checks if
<a.out.h> has been included before and defines the structure differently
in that case.

<sys/nlist_aout.h> has to be modified for GNU/kFreeBSD, that is by 
checking for __A_OUT_GNU_H__ instead of _AOUT_INCLUDE_ and by defining
the first part of the structure the same way as in the GNU libc (that is
by using a transparent union).

I am therefore reassigning the bug to kfreebsd-kernel-headers.

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net



Reply to: