summaryrefslogtreecommitdiff
path: root/ahost.c
diff options
context:
space:
mode:
Diffstat (limited to 'ahost.c')
-rw-r--r--ahost.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ahost.c b/ahost.c
index 46ec735..0e6797e 100644
--- a/ahost.c
+++ b/ahost.c
@@ -77,6 +77,13 @@ int main(int argc, char **argv)
WSAStartup(wVersionRequested, &wsaData);
#endif
+ status = ares_library_init(ARES_LIB_INIT_ALL);
+ if (status != ARES_SUCCESS)
+ {
+ fprintf(stderr, "ares_library_init: %s\n", ares_strerror(status));
+ return 1;
+ }
+
while ((c = ares_getopt(argc,argv,"dt:h")) != -1)
{
switch (c)
@@ -147,6 +154,8 @@ int main(int argc, char **argv)
ares_destroy(channel);
+ ares_library_cleanup();
+
#ifdef USE_WINSOCK
WSACleanup();
#endif