]> git.ipfire.org Git - thirdparty/curl.git/commit
c-ares: fix/tidy-up macro initializations, avoid a deprecated function
authorViktor Szakats <commit@vsz.me>
Thu, 30 Jan 2025 11:42:52 +0000 (12:42 +0100)
committerViktor Szakats <commit@vsz.me>
Mon, 3 Feb 2025 18:04:50 +0000 (19:04 +0100)
commit671e83f0b13e92538dd46f5c22b845516a2b58c9
treedd251308d8fd6a73b8af1e2ac9cbb44e3044d602
parent4f95f327093bef29a4f8fe188edc6c95f49980a5
c-ares: fix/tidy-up macro initializations, avoid a deprecated function

- replace deprecated `ares_init()` call with `ares_init_options()`.
  Follow-up to 0d4fdbf15d8eec908b3e63b606f112b18a63015e #16054

- dedupe `CARES_STATICLIB` initalizations into `curl_setup.h`, to
  ensure it's defined before the first (and every) `ares.h` include and
  avoid a potential confusion.

- move `CARES_NO_DEPRECATED` from build level to `curl_setup.h`.
  To work regardless of build system.
  It is necessary because curl calls `ares_getsock()` from two places,
  of which one feeds a chain of wrappers: `Curl_ares_getsock()`,
  `Curl_resolver_getsock()`, `Curl_resolv_getsock()`.

Closes #16131
CMakeLists.txt
lib/asyn-ares.c
lib/asyn-thread.c
lib/curl_setup.h
lib/version.c
m4/curl-confopts.m4