From 1b89456509c1ae3907bd65d9bc2114423ee4e790 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 26 May 2014 22:10:15 +0200 Subject: 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 --- lib/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/url.c') diff --git a/lib/url.c b/lib/url.c index 29222926e..fba3bd391 100644 --- 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; -- cgit v1.2.3