curl: support __ss_family use on NonStop platforms

The definition of sockaddr_storage incorrectly specifies the ss_family
field as __ss_family. This fix conditionally allows builds to succeed on
all NonStop platforms.

Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca>

Closes #14273
This commit is contained in:
Randall S. Becker 2024-07-25 22:18:46 +01:00 committed by Daniel Stenberg
parent 33826994e7
commit 2f3e57b5dd
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -157,7 +157,11 @@ static int get_address_family(curl_socket_t sockfd)
struct sockaddr_storage addr;
socklen_t addrlen = sizeof(addr);
if(getsockname(sockfd, (struct sockaddr *)&addr, &addrlen) == 0)
# ifdef __TANDEM
return addr.__ss_family;
# else
return addr.ss_family;
# endif
return AF_UNSPEC;
}
#endif