Curl_open calls the resolver init and on Windows if the resolver backend
is c-ares then the Windows sockets library (winsock) must already have
been initialized (via global init).
Ref: https://github.com/curl/curl/pull/8540#issuecomment-
1059771800
Closes https://github.com/curl/curl/pull/8719
static CURLcode unit_setup(void)
{
- return CURLE_OK;
+ int res = CURLE_OK;
+ global_init(CURL_GLOBAL_ALL);
+ return res;
}
static void unit_stop(void)
{
+ curl_global_cleanup();
}
UNITTEST_START