]>
Commit | Line | Data |
---|---|---|
499ef906 ER |
1 | --- wget-1.9.1.orig/src/main.c 2004-12-28 01:42:49.000000000 +0200 |
2 | +++ wget-1.9.1/src/main.c 2004-12-28 01:42:01.000000000 +0200 | |
3 | @@ -380,6 +380,17 @@ | |
df37a0d8 AM |
4 | |
5 | append_to_log = 0; | |
6 | ||
7 | +#ifdef ENABLE_IPV6 | |
8 | + { | |
9 | + int s = socket(AF_INET6, SOCK_STREAM, 0); | |
499ef906 | 10 | + if (s < 0 && (errno == EAFNOSUPPORT || errno == EINVAL)) { |
df37a0d8 | 11 | + ip_default_family = AF_INET; |
499ef906 ER |
12 | + } else { |
13 | + close(s); | |
14 | + } | |
df37a0d8 AM |
15 | + } |
16 | +#endif | |
17 | + | |
18 | /* Construct the name of the executable, without the directory part. */ | |
19 | exec_name = strrchr (argv[0], PATH_SEPARATOR); | |
20 | if (!exec_name) | |
02537625 AM |
21 | diff -urN wget-1.9.1.org/src/ftp-basic.c wget-1.9.1/src/ftp-basic.c |
22 | --- wget-1.9.1.org/src/ftp-basic.c 2003-11-08 20:17:55.000000000 +0100 | |
23 | +++ wget-1.9.1/src/ftp-basic.c 2005-04-25 00:08:41.000000000 +0200 | |
24 | @@ -276,6 +276,9 @@ | |
25 | /* Huh? This is not BINDERR! */ | |
26 | return BINDERR; | |
27 | inet_ntop (AF_INET6, &in_addr, ipv6, sizeof (ipv6)); | |
28 | + | |
29 | + if (strncmp(ipv6, "::ffff:", 7) == 0) | |
30 | + memmove(ipv6, ipv6 + 7, sizeof(ipv6) - 7); | |
31 | ||
32 | /* Construct the argument of EPRT (of the form |2|IPv6.ascii|PORT.ascii|). */ | |
33 | bytes = alloca (3 + strlen (ipv6) + 1 + numdigit (port) + 1 + 1); |