Commit 1b894565 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

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
parent 9d85d474
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3035,6 +3035,7 @@ AC_CHECK_FUNCS([fork \
  getpwuid \
  getrlimit \
  gettimeofday \
  if_nametoindex \
  inet_addr \
  perror \
  pipe \
+1 −1
Original line number Diff line number Diff line
@@ -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;