Fix static c-ares detection for newer Debian/Ubuntu releases

c-ares >= 1.27 renamed the static library from libcares.a to
libcares_static.a. Search for both names so the static build works
on older distros (libcares.a) and newer ones (libcares_static.a).

Fixes #3024

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Max LvandClaude Opus 4.6 committed 2026-02-10 15:43:42 +08:00
1 parent c5e8788013
commit 7ac8694aae
1 file changed
+1 -1
+1 -1
View File
@@ -105,7 +105,7 @@ find_library(LIBMBEDTLS libmbedtls.a)
find_library(LIBMBEDCRYPTO libmbedcrypto.a HINTS ${_MBEDTLS_LIB_DIR} NO_DEFAULT_PATH)
find_library(LIBMBEDCRYPTO libmbedcrypto.a)
find_library(LIBEV libev.a)
find_library(LIBUDNS libcares.a)
find_library(LIBUDNS NAMES libcares.a libcares_static.a)
find_library(LIBPCRE2 libpcre2-8.a)
# Dependencies we need for static and shared