Skip to content

Commit

Permalink
url: only use if_nametoindex() if IFNAMSIZ is available
Browse files Browse the repository at this point in the history
  • Loading branch information
dfandrich committed Apr 14, 2014
1 parent b2e9c17 commit 263ed02
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/url.c
Original file line number Diff line number Diff line change
Expand Up @@ -3995,7 +3995,7 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
}
else {
/* Zone identifier is not numeric */
#ifdef HAVE_NET_IF_H
#if defined(HAVE_NET_IF_H) && defined(IFNAMSIZ)
char ifname[IFNAMSIZ + 2];
char *square_bracket;
unsigned int scopeidx = 0;
Expand All @@ -4019,12 +4019,9 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
identifier_offset + strlen(ifname));
conn->scope = scopeidx;
}
else {
#endif /* HAVE_NET_IF_H */
else
#endif /* HAVE_NET_IF_H && IFNAMSIZ */
infof(data, "Invalid IPv6 address format\n");
#ifdef HAVE_NET_IF_H
}
#endif /* HAVE_NET_IF_H */
}
}
}
Expand Down

0 comments on commit 263ed02

Please sign in to comment.