summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/curl_addrinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'libs/libcurl/src/curl_addrinfo.c')
-rw-r--r--libs/libcurl/src/curl_addrinfo.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/libcurl/src/curl_addrinfo.c b/libs/libcurl/src/curl_addrinfo.c
index 06537b275f..1d5067bc00 100644
--- a/libs/libcurl/src/curl_addrinfo.c
+++ b/libs/libcurl/src/curl_addrinfo.c
@@ -50,6 +50,12 @@
# define in_addr_t unsigned long
#endif
+#if defined(USE_UNIX_SOCKETS) && defined(WINAPI_FAMILY) && \
+ (WINAPI_FAMILY == WINAPI_FAMILY_APP)
+ /* Required for sockaddr_un type */
+# include <afunix.h>
+#endif
+
#include <stddef.h>
#include "curl_addrinfo.h"
@@ -141,7 +147,7 @@ Curl_getaddrinfo_ex(const char *nodename,
continue;
/* ignore elements without required address info */
- if((ai->ai_addr == NULL) || !(ai->ai_addrlen > 0))
+ if(!ai->ai_addr || !(ai->ai_addrlen > 0))
continue;
/* ignore elements with bogus address size */