--- Makefile +++ Makefile 2013-12-03 08:14:47.362446079 +0000 @@ -46,7 +67,7 @@ SHELL = /bin/sh # If you know that the IPv6 functions work on your machine, you can enable # them here. -##IPv6 = -DHAVE_IPv6_FUNCS +IPv6 = -DHAVE_IPv6_FUNCS # # Binaries are stripped with this command after installation. --- fio.c +++ fio.c 2013-12-03 08:55:19.158236784 +0000 @@ -1024,6 +1024,16 @@ sopen(const char *xserver, struct sock * char *cp; char *server = (char *)xserver; +#ifdef HAVE_IPv6_FUNCS + if ((cp = strchr(server, ']')) != NULL) { + if (cp[1] == ':') { + portstr = &cp[2]; + server = salloc(cp+1 - xserver+1); + memcpy(server, xserver, cp+1 - xserver); + server[cp+1 - xserver] = '\0'; + } + } else +#endif /* HAVE_IPv6_FUNCS */ if ((cp = strchr(server, ':')) != NULL) { portstr = &cp[1]; #ifndef HAVE_IPv6_FUNCS