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
9 + int s = socket(AF_INET6, SOCK_STREAM, 0);
10 + if (s < 0 && (errno == EAFNOSUPPORT || errno == EINVAL)) {
11 + ip_default_family = AF_INET;
18 /* Construct the name of the executable, without the directory part. */
19 exec_name = strrchr (argv[0], PATH_SEPARATOR);
22 diff -urN wget-1.9.1.org/src/ftp-basic.c wget-1.9.1/src/ftp-basic.c
23 --- wget-1.9.1.org/src/ftp-basic.c 2003-11-08 20:17:55.000000000 +0100
24 +++ wget-1.9.1/src/ftp-basic.c 2005-04-25 00:18:36.000000000 +0200
26 char *request, *respline;
31 char ipv6 [8 * (4 * 3 + 3) + 8];
34 /* Huh? This is not BINDERR! */
36 inet_ntop (AF_INET6, &in_addr, ipv6, sizeof (ipv6));
38 + if (strncmp(ipv6, "::ffff:", 7) == 0) {
39 + memmove(ipv6, ipv6 + 7, sizeof(ipv6) - 7);
43 /* Construct the argument of EPRT (of the form |2|IPv6.ascii|PORT.ascii|). */
44 bytes = alloca (3 + strlen (ipv6) + 1 + numdigit (port) + 1 + 1);
45 - sprintf (bytes, "|2|%s|%u|", ipv6, port);
46 + sprintf (bytes, "|%s|%s|%u|", (af == AF_INET6) ? "2" : "1", ipv6, port);
47 /* Send PORT request. */
48 request = ftp_request ("EPRT", bytes);
49 if (0 > iwrite (RBUF_FD (rbuf), request, strlen (request)))