mirror of
https://github.com/curl/curl.git
synced 2026-08-26 21:24:08 +03:00
changed HAVE_SIN6_SCOPE_ID define to HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID since just found that ares already uses this define.
This commit is contained in:
parent
104377d718
commit
1cc50d31f9
12 changed files with 16 additions and 14 deletions
|
|
@ -86,10 +86,12 @@ char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size)
|
|||
char scope[12]="";
|
||||
#ifdef ENABLE_IPV6
|
||||
if (af == AF_INET6) {
|
||||
unsigned int scopeid;
|
||||
unsigned int scopeid = 0;
|
||||
addr = &((struct sockaddr_in6 *)iface->ifa_addr)->sin6_addr;
|
||||
#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
|
||||
/* Include the scope of this interface as part of the address */
|
||||
scopeid = ((struct sockaddr_in6 *)iface->ifa_addr)->sin6_scope_id;
|
||||
#endif
|
||||
if (scopeid)
|
||||
snprintf(scope, sizeof(scope), "%%%u", scopeid);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue