projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d85d47
)
url-parser: only use if_nametoindex if detected by configure
author
Daniel Stenberg
<daniel@haxx.se>
Mon, 26 May 2014 20:10:15 +0000
(22:10 +0200)
committer
Daniel Stenberg
<daniel@haxx.se>
Mon, 26 May 2014 20:10:15 +0000
(22:10 +0200)
The previous #ifdef detection wasn't good enough.
Bug: http://curl.haxx.se/mail/lib-2014-05/0260.html
Reported-by: Chris Young
configure.ac
patch
|
blob
|
history
lib/url.c
patch
|
blob
|
history
diff --git
a/configure.ac
b/configure.ac
index 11772444ee1091aaa229eb6b7a955ea0c59a46da..d9b7a247e0e88bd920403123cc11fcdf0e59c151 100644
(file)
--- a/
configure.ac
+++ b/
configure.ac
@@
-3035,6
+3035,7
@@
AC_CHECK_FUNCS([fork \
getpwuid \
getrlimit \
gettimeofday \
+ if_nametoindex \
inet_addr \
perror \
pipe \
diff --git
a/lib/url.c
b/lib/url.c
index 29222926e45a10e95f2c0414c6820be77e4a9d9c..fba3bd3917dd2ba2d792128ae1440604a5154817 100644
(file)
--- a/
lib/url.c
+++ b/
lib/url.c
@@
-4009,7
+4009,7
@@
static CURLcode parseurlandfillconn(struct SessionHandle *data,
}
else {
/* 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 *square_bracket;
unsigned int scopeidx = 0;