diff options
Diffstat (limited to 'libs/libcurl/src/curl_addrinfo.c')
-rw-r--r-- | libs/libcurl/src/curl_addrinfo.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libs/libcurl/src/curl_addrinfo.c b/libs/libcurl/src/curl_addrinfo.c index 6eb28bbcb6..55d5a3942d 100644 --- a/libs/libcurl/src/curl_addrinfo.c +++ b/libs/libcurl/src/curl_addrinfo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -27,6 +27,9 @@ #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif +#ifdef HAVE_NETINET_IN6_H +# include <netinet/in6.h> +#endif #ifdef HAVE_NETDB_H # include <netdb.h> #endif @@ -47,6 +50,10 @@ # define in_addr_t unsigned long #endif +#if defined(WIN32) && defined(USE_UNIX_SOCKETS) +#include <afunix.h> +#endif + #include <stddef.h> #include "curl_addrinfo.h" @@ -338,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 = (unsigned short)(he->h_addrtype); + addr->sin_family = (CURL_SA_FAMILY_T)(he->h_addrtype); addr->sin_port = htons((unsigned short)port); break; @@ -347,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 = (unsigned short)(he->h_addrtype); + addr6->sin6_family = (CURL_SA_FAMILY_T)(he->h_addrtype); addr6->sin6_port = htons((unsigned short)port); break; #endif |