Bug#564232: bind behaviour different between linux and freebsd ?
----------------original message-----------------
De: "Jan-Benedict Glaw" jbglaw@lug-owl.de
A: "Xavier Grave" grave@ipno.in2p3.fr, 564232@bugs.debian.org
Date: Sat, 9 Jan 2010 11:24:15 +0100
-------------------------------------------------
> On Sat, 2010-01-09 02:50:23 +0100, Xavier Grave grave@ipno.in2p3.fr
> wrote:
>> The following C code give different results on kfreebsd amd64 on one side
>> and sparc/powerpc/ on the other side
>> for kfreebsd amd64 :
>> xavier@debian:~$ ./bind_socket_c
>> sin len 16
>> res -1
>> and
>> for sparc :
>> ./xavier@canis-latrans:~$ ./bind_socket_c
>> sin len 16
>> res 0
>> for powerpc :
>> xavier@power5:~$ ./bind_socket_c
>> sin len 16
>> res 0
>> code used :
>> problem doesn't seem any more specific to Ada ?
>
> `errno' should contain more detailed information about why it failed.
> Also, keep in mind that "sin.sin_port = 5786" is probably not what you
> want, think of network byte order! Sparc and PPC are big endian and I
> guess that amd64 is little endian.
I have tested the same code (both Ada and c) on Debian GNU/Linux i386 and
results are similar to sparc and powerpc
But I will try with the good network bytes order on FreeBSD, thanks for the
tip
xavier
Reply to: