]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
connect: use CURL_SA_FAMILY_T for portability
authorDaniel Stenberg <daniel@haxx.se>
Mon, 19 Apr 2021 21:28:12 +0000 (23:28 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 21 Apr 2021 07:22:37 +0000 (09:22 +0200)
Reported-by: Kevin R. Bulgrien
Bug: https://curl.se/mail/lib-2021-04/0071.html

Closes #6918

lib/connect.c

index 296fb62503ba67b76725ecbb4ca5dbf2b8e00c3a..824ced31e916e0373a22c5b60e368e84ce56f42e 100644 (file)
@@ -660,7 +660,7 @@ bool Curl_addr2string(struct sockaddr *sa, curl_socklen_t salen,
 #endif
 #if defined(HAVE_SYS_UN_H) && defined(AF_UNIX)
     case AF_UNIX:
-      if(salen > (curl_socklen_t)sizeof(sa_family_t)) {
+      if(salen > (curl_socklen_t)sizeof(CURL_SA_FAMILY_T)) {
         su = (struct sockaddr_un*)sa;
         msnprintf(addr, MAX_IPADR_LEN, "%s", su->sun_path);
       }