summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGisle Vanem <gvanem@broadpark.no>2012-08-24 23:17:26 +0200
committerDaniel Stenberg <daniel@haxx.se>2012-08-24 23:17:26 +0200
commit805c736e36a1c2cd4909ccbb9eede0657e29d6fc (patch)
tree6ed41c6fae86f9c91fc6bd985dff331750739366
parent65ac7e706d852c0b57bfdb7822c0a203cf5de995 (diff)
downloadc-ares-805c736e36a1c2cd4909ccbb9eede0657e29d6fc.tar.gz
c-ares-805c736e36a1c2cd4909ccbb9eede0657e29d6fc.tar.bz2
c-ares-805c736e36a1c2cd4909ccbb9eede0657e29d6fc.zip
adig: perror() doesn't work for socket errors on windows
... so print the SOCKERRNO instead
-rw-r--r--adig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/adig.c b/adig.c
index ff1cd44..47fa5a4 100644
--- a/adig.c
+++ b/adig.c
@@ -390,9 +390,9 @@ int main(int argc, char **argv)
break;
tvp = ares_timeout(channel, NULL, &tv);
count = select(nfds, &read_fds, &write_fds, NULL, tvp);
- if (count < 0 && SOCKERRNO != EINVAL)
+ if (count < 0 && (status = SOCKERRNO) != EINVAL)
{
- perror("select");
+ printf("select fail: %d", status);
return 1;
}
ares_process(channel, &read_fds, &write_fds);