Re: sockaddr_in structure in in.h

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sat, 22 Feb 1997 23:07:07 +0000 (GMT)


> struct sockaddr_in
> {
> sa_family_t sin_family; /* Address family */
> unsigned short int sin_port; /* Port number */
> struct in_addr sin_addr; /* Internet address */
>
> /* Pad to size of `struct sockaddr'. */
> unsigned char __pad[__SOCK_SIZE__ - sizeof(short int) -
> sizeof(unsign\ed short int) - sizeof(struct in_addr)];
> };
>
> Why is sin_family defined in 2.1.26 as sa_family_t and in 2.0.29 as short
> int?
>
> I was trying to compile fvwm2 but it would only compile if I used the one
> in
> 2.0.29.

You need to be including the right files to get sa_family_t defined. The
change is for compliance with parts of the current draft of POSIX 1003.1g

Alan