diff options
Diffstat (limited to 'ares/acountry.c')
-rw-r--r-- | ares/acountry.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ares/acountry.c b/ares/acountry.c index cac9ae5b0..1899ae962 100644 --- a/ares/acountry.c +++ b/ares/acountry.c @@ -116,6 +116,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 ((ch = ares_getopt(argc, argv, "dvh?")) != -1) switch (ch) { @@ -178,6 +185,8 @@ int main(int argc, char **argv) wait_ares(channel); ares_destroy(channel); + ares_library_cleanup(); + #if defined(WIN32) && !defined(WATT32) WSACleanup(); #endif |