mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 16:18:48 -05:00
url-parser: only use if_nametoindex if detected by configure
The previous #ifdef detection wasn't good enough. Bug: http://curl.haxx.se/mail/lib-2014-05/0260.html Reported-by: Chris Young
This commit is contained in:
parent
9d85d4746b
commit
1b89456509
@ -3035,6 +3035,7 @@ AC_CHECK_FUNCS([fork \
|
|||||||
getpwuid \
|
getpwuid \
|
||||||
getrlimit \
|
getrlimit \
|
||||||
gettimeofday \
|
gettimeofday \
|
||||||
|
if_nametoindex \
|
||||||
inet_addr \
|
inet_addr \
|
||||||
perror \
|
perror \
|
||||||
pipe \
|
pipe \
|
||||||
|
@ -4009,7 +4009,7 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Zone identifier is not numeric */
|
/* Zone identifier is not numeric */
|
||||||
#if defined(HAVE_NET_IF_H) && defined(IFNAMSIZ)
|
#if defined(HAVE_NET_IF_H) && defined(IFNAMSIZ) && defined(HAVE_IF_NAMETOINDEX)
|
||||||
char ifname[IFNAMSIZ + 2];
|
char ifname[IFNAMSIZ + 2];
|
||||||
char *square_bracket;
|
char *square_bracket;
|
||||||
unsigned int scopeidx = 0;
|
unsigned int scopeidx = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user