curl.h: make CURL_IPRESOLVE_* symbols defined as longs

... as `curl_easy_setopt()` expects them to be.

Also remove some casting workarounds.
This commit is contained in:
Christian Hesse 2025-07-01 10:29:13 +02:00
parent dc28bb86c1
commit 2ce95c6f46
4 changed files with 7 additions and 7 deletions

View file

@ -35,7 +35,7 @@ int main(void)
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, (long)CURL_IPRESOLVE_V6);
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");

View file

@ -66,7 +66,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
/* of all addresses example.com resolves to, only IPv6 ones are used */
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, (long)CURL_IPRESOLVE_V6);
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
res = curl_easy_perform(curl);