Skip to content

deps: update c-ares to v1.34.5 #57792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions deps/cares/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ INCLUDE (CheckCSourceCompiles)
INCLUDE (CheckStructHasMember)
INCLUDE (CheckLibraryExists)

PROJECT (c-ares LANGUAGES C VERSION "1.34.4" )
PROJECT (c-ares LANGUAGES C VERSION "1.34.5" )

# Set this version before release
SET (CARES_VERSION "${PROJECT_VERSION}")
Expand All @@ -30,7 +30,7 @@ INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w
# For example, a version of 4:0:2 would generate output such as:
# libname.so -> libname.so.2
# libname.so.2 -> libname.so.2.2.0
SET (CARES_LIB_VERSIONINFO "21:3:19")
SET (CARES_LIB_VERSIONINFO "21:4:19")


OPTION (CARES_STATIC "Build as a static library" OFF)
Expand Down Expand Up @@ -274,12 +274,14 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "QNX")
LIST (APPEND SYSFLAGS -D_QNX_SOURCE)
ELSEIF (WIN32)
LIST (APPEND SYSFLAGS -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_WIN32_WINNT=0x0602)
LIST (APPEND SYSFLAGS -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
IF (NOT CMAKE_C_FLAGS MATCHES ".*-D_WIN32_WINNT=.*")
LIST (APPEND SYSFLAGS -D_WIN32_WINNT=0x0602)
ENDIF ()
ENDIF ()
ADD_DEFINITIONS(${SYSFLAGS})



# Tell C-Ares about libraries to depend on
IF (HAVE_LIBRESOLV)
LIST (APPEND CARES_DEPENDENT_LIBS resolv)
Expand Down Expand Up @@ -426,6 +428,7 @@ CHECK_SYMBOL_EXISTS (getservbyname_r "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_GETSERV
CHECK_SYMBOL_EXISTS (gettimeofday "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_GETTIMEOFDAY)
CHECK_SYMBOL_EXISTS (if_indextoname "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_IF_INDEXTONAME)
CHECK_SYMBOL_EXISTS (if_nametoindex "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_IF_NAMETOINDEX)
CHECK_SYMBOL_EXISTS (GetBestRoute2 "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_GETBESTROUTE2)
CHECK_SYMBOL_EXISTS (ConvertInterfaceIndexToLuid "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CONVERTINTERFACEINDEXTOLUID)
CHECK_SYMBOL_EXISTS (ConvertInterfaceLuidToNameA "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CONVERTINTERFACELUIDTONAMEA)
CHECK_SYMBOL_EXISTS (NotifyIpInterfaceChange "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_NOTIFYIPINTERFACECHANGE)
Expand Down Expand Up @@ -503,11 +506,7 @@ IF (CARES_THREADS)
CARES_EXTRAINCLUDE_IFSET (HAVE_PTHREAD_H pthread.h)
CARES_EXTRAINCLUDE_IFSET (HAVE_PTHREAD_NP_H pthread_np.h)
CHECK_SYMBOL_EXISTS (pthread_init "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_PTHREAD_INIT)
# Make sure libcares.pc.cmake knows about thread libraries on static builds
# The variable set by FIND_PACKAGE(Threads) has a -l prefix on it, we need
# to strip that first since CARES_DEPENDENT_LIBS doesn't expect that.
STRING (REPLACE "-l" "" CARES_THREAD_LIBRARY "${CMAKE_THREAD_LIBS_INIT}")
LIST (APPEND CARES_DEPENDENT_LIBS ${CARES_THREAD_LIBRARY})
LIST (APPEND CARES_DEPENDENT_LIBS ${CMAKE_THREAD_LIBS_INIT})
ELSE ()
MESSAGE (WARNING "Threading support not found, disabling...")
SET (CARES_THREADS OFF)
Expand Down Expand Up @@ -777,7 +776,10 @@ IF (CARES_INSTALL)

# pkgconfig support for static builds
FOREACH (LIB ${CARES_DEPENDENT_LIBS})
SET (CARES_PRIVATE_LIBS "${CARES_PRIVATE_LIBS} -l${LIB}")
IF (NOT LIB MATCHES "^-")
SET (LIB "-l${LIB}")
ENDIF ()
SET (CARES_PRIVATE_LIBS "${CARES_PRIVATE_LIBS} ${LIB}")
ENDFOREACH ()

CONFIGURE_FILE("libcares.pc.cmake" "libcares.pc" @ONLY)
Expand Down
1 change: 1 addition & 0 deletions deps/cares/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FILECMD = @FILECMD@
GCOV = @GCOV@
GENHTML = @GENHTML@
GMOCK112_CFLAGS = @GMOCK112_CFLAGS@
Expand Down
4 changes: 3 additions & 1 deletion deps/cares/Makefile.m32
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ RANLIB = $(CROSSPREFIX)ranlib
#RM = rm -f
CP = cp -afv

CFLAGS = $(CARES_CFLAG_EXTRAS) -O2 -Wall -I./include -I./src/lib -I./src/lib/include -D_WIN32_WINNT=0x0602
WIN32_WINNT ?= 0x0602

CFLAGS = $(CARES_CFLAG_EXTRAS) -O2 -Wall -I./include -I./src/lib -I./src/lib/include -D_WIN32_WINNT=$(WIN32_WINNT)
CFLAGS += -DCARES_STATICLIB
LDFLAGS = $(CARES_LDFLAG_EXTRAS) -s
LIBS = -lws2_32 -liphlpapi
Expand Down
33 changes: 18 additions & 15 deletions deps/cares/RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
## c-ares version 1.34.4 - December 14 2024
## c-ares version 1.34.5 - April 8 2025

This is a bugfix release.
This is a security release.

Security:
* CVE-2025-31498. A use-after-free bug has been uncovered in read_answers() that
was introduced in v1.32.3. Please see https://github.com/c-ares/c-ares/security/advisories/GHSA-6hxc-62jh-p29v

Changes:
* QNX Port: Port to QNX 8, add primary config reading support, add CI build. [PR #934](https://github.com/c-ares/c-ares/pull/934), [PR #937](https://github.com/c-ares/c-ares/pull/937), [PR #938](https://github.com/c-ares/c-ares/pull/938)
* Restore Windows XP support. [PR #958](https://github.com/c-ares/c-ares/pull/958)

Bugfixes:
* Empty TXT records were not being preserved. [PR #922](https://github.com/c-ares/c-ares/pull/922)
* docs: update deprecation notices for `ares_create_query()` and `ares_mkquery()`. [PR #910](https://github.com/c-ares/c-ares/pull/910)
* license: some files weren't properly updated. [PR #920](https://github.com/c-ares/c-ares/pull/920)
* Fix bind local device regression from 1.34.0. [PR #929](https://github.com/c-ares/c-ares/pull/929), [PR #931](https://github.com/c-ares/c-ares/pull/931), [PR #935](https://github.com/c-ares/c-ares/pull/935)
* CMake: set policy version to prevent deprecation warnings. [PR #932](https://github.com/c-ares/c-ares/pull/932)
* CMake: shared and static library names should be the same on unix platforms like autotools uses. [PR #933](https://github.com/c-ares/c-ares/pull/933)
* Update to latest autoconf archive macros for enhanced system compatibility. [PR #936](https://github.com/c-ares/c-ares/pull/936)
* A missing mutex initialization would make busy polling for configuration
changes (platforms other than Windows, Linux, MacOS) eat too much CPU
[PR #974](https://github.com/c-ares/c-ares/pull/974)
* Pkgconfig may be generated wrong for static builds in relation to `-pthread`
[PR #965](https://github.com/c-ares/c-ares/pull/965)
* Localhost resolution can fail if only one address family is in `/etc/hosts`
[PR #947](https://github.com/c-ares/c-ares/pull/947)

Thanks go to these friendly people for their efforts and contributions for this
release:

* Brad House (@bradh352)
* Daniel Stenberg (@bagder)
* Gregor Jasny (@gjasny)
* @marcovsz
* Nikolaos Chatzikonstantinou (@createyourpersonalaccount)
* @vlasovsoft1979
* Erik Lax (@eriklax)
* Florian Pfisterer (@FlorianPfisterer)
* Kai Pastor (@dg0yt)

2 changes: 1 addition & 1 deletion deps/cares/aminclude_static.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# aminclude_static.am generated automatically by Autoconf
# from AX_AM_MACROS_STATIC on Sat Dec 14 15:15:44 UTC 2024
# from AX_AM_MACROS_STATIC on Tue Apr 8 12:12:30 UTC 2025


# Code coverage
Expand Down
Loading
Loading