diff options
author | Gisle Vanem <gvanem@broadpark.no> | 2012-08-24 23:17:26 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2012-08-24 23:17:26 +0200 |
commit | 805c736e36a1c2cd4909ccbb9eede0657e29d6fc (patch) | |
tree | 6ed41c6fae86f9c91fc6bd985dff331750739366 | |
parent | 65ac7e706d852c0b57bfdb7822c0a203cf5de995 (diff) | |
download | c-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |