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

Bug#564232: Bug 564232 and 561121 related to Debian GNU/kFreeBSD near to be fixed

>> There is a big difference between (kernels of) Linux and FreeBSD in this:
>> Linux:
>> struct sockaddr {
>> short sa_family;
>> char sa_data[14];
>> }
>> FreeBSD:
>> struct sockaddr {
>> unsigned char sa_len;
>> unsigned char sa_family;
>> char sa_data[14];
>> }
>> Ada bindings have to closely follow definition of this struct.
> Thanks Petr, I totally missed the difference in definition for
> __SOCKADDR_COMMON between linux and freebsd in bits/sockaddr.h since
> netinet/in.h have same md5sum on both arch.

I have spent some time looking in details to the binding and it seems that
src/gcc/ada/s-oscons-tmplt.c doesn't do it's job cleanly. The definition in
src/gcc/ada/gsocket.h is quite clear :
#if defined (__FreeBSD__) || defined (__vxworks) || defined(__rtems__)
# define Has_Sockaddr_Len 1
# define Has_Sockaddr_Len 0

So I suspect a problem related to the Debian naming x86_64-kfreebsd-gnu-gcc
ie kfreebsd instead of freebsd ?
I'm investigating under this way now. If somebody already had this king on
problem for other package I'll be happy to apply similar fix they can I


Reply to: