mirror of
https://github.com/moparisthebest/curl
synced 2025-01-09 04:58:00 -05:00
connect: use CURL_SA_FAMILY_T for portability
Reported-by: Kevin R. Bulgrien Bug: https://curl.se/mail/lib-2021-04/0071.html Closes #6918
This commit is contained in:
parent
04488851e2
commit
355aae5b7f
@ -660,7 +660,7 @@ bool Curl_addr2string(struct sockaddr *sa, curl_socklen_t salen,
|
|||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_SYS_UN_H) && defined(AF_UNIX)
|
#if defined(HAVE_SYS_UN_H) && defined(AF_UNIX)
|
||||||
case 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;
|
su = (struct sockaddr_un*)sa;
|
||||||
msnprintf(addr, MAX_IPADR_LEN, "%s", su->sun_path);
|
msnprintf(addr, MAX_IPADR_LEN, "%s", su->sun_path);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user