Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adig: perror() doesn't work for socket errors on windows

... so print the SOCKERRNO instead
  • Loading branch information...
commit 805c736e36a1c2cd4909ccbb9eede0657e29d6fc 1 parent 65ac7e7
Gisle Vanem authored committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 adig.c
View
4 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);
Please sign in to comment.
Something went wrong with that request. Please try again.