On 18/04/12 19:02, Steven M. Schweda wrote:
> The problem seems to originate in "netinet/in.h":
I assume that's the system header provided by Tru64, not by something else.
> [...]
>
> Thus, with none of the macros _SOCKADDR_LEN, _KERNEL, or
> _XOPEN_SOURCE_EXTENDED defined, "struct sockaddr_in" does not include
> the "sin_len" member, so it's incompatible with a plain
> "struct sockaddr", and connect.c:sockaddr_set_data() stores AF_INET at
> the wrong offset in the actual sockaddr structure, which confuses
> everyone.
Such definition makes very little sense, as that would mean the system
supports two different a struct sockaddr_in, and would somehow need to
differenciate between them in api calls.
Is there any versioning for that in the header? Eg. the functions connect
being #defined to a different name depending on those same macros.
Does man connect give any hint?