Server書き換え、めんどくさがり - 書き換え後 /* have cmd line option to change this */ int af = AF_INET6; struct addrinfo hints, *res; int s, i, on = 1; memset(&hints, 0, sizeof(hints)); hints.ai_family = af; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_PASSIVE; error = getaddrinfo(NULL, "http", &hints, &res); if (error) exit(1); if (res->ai_next) { fprintf(stderr, "multiple addr"); exit(1); } /* res has chain of wildcard addrs */