From 8020a0c62f79239c802ed6fa840b11677176910a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 6 Apr 2018 15:26:04 +0200 Subject: curl_setup: provide a CURL_SA_FAMILY_T type if none exists ... and use this type instead of 'sa_family_t' in the code since several platforms don't have it. Closes #2463 --- lib/curl_addrinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/curl_addrinfo.c') diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c index 01775f704..55d5a3942 100644 --- a/lib/curl_addrinfo.c +++ b/lib/curl_addrinfo.c @@ -345,7 +345,7 @@ Curl_he2ai(const struct hostent *he, int port) addr = (void *)ai->ai_addr; /* storage area for this info */ memcpy(&addr->sin_addr, curr, sizeof(struct in_addr)); - addr->sin_family = (sa_family_t)(he->h_addrtype); + addr->sin_family = (CURL_SA_FAMILY_T)(he->h_addrtype); addr->sin_port = htons((unsigned short)port); break; @@ -354,7 +354,7 @@ Curl_he2ai(const struct hostent *he, int port) addr6 = (void *)ai->ai_addr; /* storage area for this info */ memcpy(&addr6->sin6_addr, curr, sizeof(struct in6_addr)); - addr6->sin6_family = (sa_family_t)(he->h_addrtype); + addr6->sin6_family = (CURL_SA_FAMILY_T)(he->h_addrtype); addr6->sin6_port = htons((unsigned short)port); break; #endif -- cgit v1.2.3