Simplify c-ares function capability check
This commit is contained in:
parent
084447e414
commit
0cf8d4f8e8
@ -280,7 +280,7 @@ CURLcode curl_global_init(long flags)
|
|||||||
idna_init();
|
idna_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_ARES) && defined(ARES_VERSION) && (ARES_VERSION >= 0x010601)
|
#ifdef CARES_HAVE_ARES_LIBRARY_INIT
|
||||||
if(ares_library_init(ARES_LIB_INIT_ALL)) {
|
if(ares_library_init(ARES_LIB_INIT_ALL)) {
|
||||||
DEBUGF(fprintf(stderr, "Error: ares_library_init failed\n"));
|
DEBUGF(fprintf(stderr, "Error: ares_library_init failed\n"));
|
||||||
return CURLE_FAILED_INIT;
|
return CURLE_FAILED_INIT;
|
||||||
@ -340,7 +340,7 @@ void curl_global_cleanup(void)
|
|||||||
if(init_flags & CURL_GLOBAL_SSL)
|
if(init_flags & CURL_GLOBAL_SSL)
|
||||||
Curl_ssl_cleanup();
|
Curl_ssl_cleanup();
|
||||||
|
|
||||||
#if defined(USE_ARES) && defined(ARES_VERSION) && (ARES_VERSION >= 0x010601)
|
#ifdef CARES_HAVE_ARES_LIBRARY_CLEANUP
|
||||||
ares_library_cleanup();
|
ares_library_cleanup();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user