diff -r 904b7747c223 Makefile --- a/Makefile Fri Aug 06 09:52:12 2010 +0100 +++ b/Makefile Sat Oct 09 20:27:50 2010 -0700 @@ -17,7 +17,7 @@ @echo CC $< @${CC} -c ${CFLAGS} $< -${OBJ}: config.mk +${OBJ}: config.mk util.c sic: ${OBJ} @echo CC -o $@ diff -r 904b7747c223 util.c --- a/util.c Fri Aug 06 09:52:12 2010 +0100 +++ b/util.c Sat Oct 09 20:27:50 2010 -0700 @@ -21,12 +21,13 @@ static struct addrinfo hints; int srv; struct addrinfo *res, *r; + int err; memset(&hints, 0, sizeof hints); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; - if(getaddrinfo(host, port, &hints, &res) != 0) - eprint("error: cannot resolve hostname '%s':", host); + if((err = getaddrinfo(host, port, &hints, &res)) != 0) + eprint("error: cannot resolve hostname '%s': %s\n", host, gai_strerror(err)); for(r = res; r; r = r->ai_next) { if((srv = socket(r->ai_family, r->ai_socktype, r->ai_protocol)) == -1) continue;