diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2014-04-14 08:02:06 +0200 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2014-04-14 08:02:06 +0200 |
commit | 263ed02da6b55dfeeaaa47c3e4704074366b37c7 (patch) | |
tree | cc4044eb720b101bc9f4175bc6ee97c08ea870b0 | |
parent | b2e9c17a19196adf4b38be0927d14f805b14b95f (diff) |
url: only use if_nametoindex() if IFNAMSIZ is available
-rw-r--r-- | lib/url.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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; @@ -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 */ } } } |