url: only use if_nametoindex() if IFNAMSIZ is available
This commit is contained in:
parent
b2e9c17a19
commit
263ed02da6
@ -3995,7 +3995,7 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Zone identifier is not numeric */
|
/* Zone identifier is not numeric */
|
||||||
#ifdef HAVE_NET_IF_H
|
#if defined(HAVE_NET_IF_H) && defined(IFNAMSIZ)
|
||||||
char ifname[IFNAMSIZ + 2];
|
char ifname[IFNAMSIZ + 2];
|
||||||
char *square_bracket;
|
char *square_bracket;
|
||||||
unsigned int scopeidx = 0;
|
unsigned int scopeidx = 0;
|
||||||
@ -4019,12 +4019,9 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
|
|||||||
identifier_offset + strlen(ifname));
|
identifier_offset + strlen(ifname));
|
||||||
conn->scope = scopeidx;
|
conn->scope = scopeidx;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
#endif /* HAVE_NET_IF_H */
|
#endif /* HAVE_NET_IF_H && IFNAMSIZ */
|
||||||
infof(data, "Invalid IPv6 address format\n");
|
infof(data, "Invalid IPv6 address format\n");
|
||||||
#ifdef HAVE_NET_IF_H
|
|
||||||
}
|
|
||||||
#endif /* HAVE_NET_IF_H */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user