summaryrefslogtreecommitdiff
path: root/net-dns/c-ares/files
diff options
context:
space:
mode:
Diffstat (limited to 'net-dns/c-ares/files')
-rw-r--r--net-dns/c-ares/files/c-ares-1.24.0-ares__iface_ips_enumerate-stub.patch34
-rw-r--r--net-dns/c-ares/files/c-ares-1.24.0-getrandom.patch80
-rw-r--r--net-dns/c-ares/files/c-ares-1.24.0-tests-symbol-hiding.patch109
3 files changed, 0 insertions, 223 deletions
diff --git a/net-dns/c-ares/files/c-ares-1.24.0-ares__iface_ips_enumerate-stub.patch b/net-dns/c-ares/files/c-ares-1.24.0-ares__iface_ips_enumerate-stub.patch
deleted file mode 100644
index 12252cb1741b..000000000000
--- a/net-dns/c-ares/files/c-ares-1.24.0-ares__iface_ips_enumerate-stub.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-https://github.com/c-ares/c-ares/commit/eebfe0c15e1cc231500dfd79c730788790ec5251
-
-From eebfe0c15e1cc231500dfd79c730788790ec5251 Mon Sep 17 00:00:00 2001
-From: Brad House <brad@brad-house.com>
-Date: Sun, 17 Dec 2023 19:03:33 -0500
-Subject: [PATCH] Fix bad stub for ares__iface_ips_enumerate()
-
-If the ability to enumerate interface ip addresses does not exist
-on a system, the stub function contained the wrong prototype.
-
-Fixes Bug: #668
-Fix By: Brad House (@bradh352)
----
- src/lib/ares__iface_ips.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/src/lib/ares__iface_ips.c b/src/lib/ares__iface_ips.c
-index e10a0d80c..7cd12a605 100644
---- a/src/lib/ares__iface_ips.c
-+++ b/src/lib/ares__iface_ips.c
-@@ -510,11 +510,10 @@ static ares_status_t ares__iface_ips_enumerate(ares__iface_ips_t *ips,
- #else
-
- static ares_status_t ares__iface_ips_enumerate(ares__iface_ips_t *ips,
-- ares__iface_ip_flags_t flags,
- const char *name)
- {
- (void)ips;
-- (void)flags;
-+ (void)name;
- return ARES_ENOTIMP;
- }
-
-
diff --git a/net-dns/c-ares/files/c-ares-1.24.0-getrandom.patch b/net-dns/c-ares/files/c-ares-1.24.0-getrandom.patch
deleted file mode 100644
index 090690213e22..000000000000
--- a/net-dns/c-ares/files/c-ares-1.24.0-getrandom.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-https://github.com/c-ares/c-ares/commit/d8edb76bece36267c4c55355ae9c7009e131a0e0
-
-From d8edb76bece36267c4c55355ae9c7009e131a0e0 Mon Sep 17 00:00:00 2001
-From: Brad House <brad@brad-house.com>
-Date: Sun, 17 Dec 2023 11:08:21 -0500
-Subject: [PATCH] getrandom() may require sys/random.h on some systems
-
-There is a reported build issue where getrandom() is detected
-but compile fails due to a missing prototype. This commit attempts
-to resolve that issue.
-
-Fixes Bug: #665
-Fix By: Brad House (@bradh352)
----
- CMakeLists.txt | 2 ++
- configure.ac | 1 +
- src/lib/ares_config.h.cmake | 3 +++
- src/lib/ares_rand.c | 3 +++
- 4 files changed, 9 insertions(+)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index a8d3eed06..29f5d7ed3 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -225,6 +225,7 @@ CHECK_INCLUDE_FILES (sys/select.h HAVE_SYS_SELECT_H)
- CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H)
- CHECK_INCLUDE_FILES (sys/time.h HAVE_SYS_TIME_H)
- CHECK_INCLUDE_FILES (sys/uio.h HAVE_SYS_UIO_H)
-+CHECK_INCLUDE_FILES (sys/random.h HAVE_SYS_RANDOM_H)
- CHECK_INCLUDE_FILES (ifaddrs.h HAVE_IFADDRS_H)
- CHECK_INCLUDE_FILES (time.h HAVE_TIME_H)
- CHECK_INCLUDE_FILES (dlfcn.h HAVE_DLFCN_H)
-@@ -323,6 +324,7 @@ CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_SOCKIO_H sys/sockio.h)
- CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_TIME_H sys/time.h)
- CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_STAT_H sys/stat.h)
- CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_UIO_H sys/uio.h)
-+CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_RANDOM_H sys/random.h)
- CARES_EXTRAINCLUDE_IFSET (HAVE_TIME_H time.h)
- CARES_EXTRAINCLUDE_IFSET (HAVE_FCNTL_H fcntl.h)
- CARES_EXTRAINCLUDE_IFSET (HAVE_UNISTD_H unistd.h)
-diff --git a/configure.ac b/configure.ac
-index 7a6b14092..e9c2534cd 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -574,6 +574,7 @@ AC_CHECK_HEADERS(
- sys/ioctl.h \
- sys/param.h \
- sys/uio.h \
-+ sys/random.h \
- assert.h \
- iphlpapi.h \
- netioapi.h \
-diff --git a/src/lib/ares_config.h.cmake b/src/lib/ares_config.h.cmake
-index c2974dced..3fb85d54f 100644
---- a/src/lib/ares_config.h.cmake
-+++ b/src/lib/ares_config.h.cmake
-@@ -320,6 +320,9 @@
- /* Define to 1 if you have the <sys/param.h> header file. */
- #cmakedefine HAVE_SYS_PARAM_H
-
-+/* Define to 1 if you have the <sys/random.h> header file. */
-+#cmakedefine HAVE_SYS_RANDOM_H
-+
- /* Define to 1 if you have the <sys/select.h> header file. */
- #cmakedefine HAVE_SYS_SELECT_H
-
-diff --git a/src/lib/ares_rand.c b/src/lib/ares_rand.c
-index e6e35ef61..867ca3340 100644
---- a/src/lib/ares_rand.c
-+++ b/src/lib/ares_rand.c
-@@ -28,6 +28,9 @@
- #include "ares.h"
- #include "ares_private.h"
- #include <stdlib.h>
-+#ifdef HAVE_SYS_RANDOM_H
-+# include <sys/random.h>
-+#endif
-
-
- typedef enum {
diff --git a/net-dns/c-ares/files/c-ares-1.24.0-tests-symbol-hiding.patch b/net-dns/c-ares/files/c-ares-1.24.0-tests-symbol-hiding.patch
deleted file mode 100644
index 901966330d1c..000000000000
--- a/net-dns/c-ares/files/c-ares-1.24.0-tests-symbol-hiding.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-https://github.com/c-ares/c-ares/commit/7dd384a99cc385e408e64c3e0af4e0e2136ed034
-
-From 7dd384a99cc385e408e64c3e0af4e0e2136ed034 Mon Sep 17 00:00:00 2001
-From: Brad House <brad@brad-house.com>
-Date: Sun, 17 Dec 2023 08:16:24 -0500
-Subject: [PATCH] fix test building with symbol hiding
-
-New test cases depend on internal symbols for calculating timeouts.
-Disable those test features if symbol hiding is enabled.
-
-Fixes Bug: #664
-Fix By: Brad House (@bradh352)
----
- test/ares-test-mock-ai.cc | 2 ++
- test/ares-test-mock.cc | 4 ++--
- test/ares-test.cc | 12 ++++++++++++
- 3 files changed, 16 insertions(+), 2 deletions(-)
-
-diff --git a/test/ares-test-mock-ai.cc b/test/ares-test-mock-ai.cc
-index c55676f6c..57b9d5ee2 100644
---- a/test/ares-test-mock-ai.cc
-+++ b/test/ares-test-mock-ai.cc
-@@ -442,6 +442,7 @@ TEST_P(MockChannelTestAI, FamilyV6) {
- EXPECT_THAT(result.ai_, IncludesV6Address("2121:0000:0000:0000:0000:0000:0000:0303"));
- }
-
-+#ifndef CARES_SYMBOL_HIDING
- // Test case for Issue #662
- TEST_P(MockChannelTestAI, PartialQueryCancel) {
- std::vector<byte> nothing;
-@@ -469,6 +470,7 @@ TEST_P(MockChannelTestAI, PartialQueryCancel) {
- EXPECT_TRUE(result.done_);
- EXPECT_EQ(ARES_ECANCELLED, result.status_);
- }
-+#endif
-
- TEST_P(MockChannelTestAI, FamilyV4) {
- DNSPacket rsp4;
-diff --git a/test/ares-test-mock.cc b/test/ares-test-mock.cc
-index 6afa8f989..849eb6980 100644
---- a/test/ares-test-mock.cc
-+++ b/test/ares-test-mock.cc
-@@ -826,7 +826,7 @@ TEST_P(MockChannelTest, V4WorksV6Timeout) {
- EXPECT_EQ("{'www.google.com' aliases=[] addrs=[1.2.3.4]}", ss.str());
- }
-
--
-+#ifndef CARES_SYMBOL_HIDING
- // Test case for Issue #662
- TEST_P(MockChannelTest, PartialQueryCancel) {
- std::vector<byte> nothing;
-@@ -849,7 +849,7 @@ TEST_P(MockChannelTest, PartialQueryCancel) {
- EXPECT_TRUE(result.done_);
- EXPECT_EQ(ARES_ECANCELLED, result.status_);
- }
--
-+#endif
-
- TEST_P(MockChannelTest, UnspecifiedFamilyV6) {
- DNSPacket rsp6;
-diff --git a/test/ares-test.cc b/test/ares-test.cc
-index faad01486..3a55b73d3 100644
---- a/test/ares-test.cc
-+++ b/test/ares-test.cc
-@@ -105,6 +105,8 @@ void ProcessWork(ares_channel_t *channel,
- unsigned int cancel_ms) {
- int nfds, count;
- fd_set readers, writers;
-+
-+#ifndef CARES_SYMBOL_HIDING
- struct timeval tv_begin = ares__tvnow();
- struct timeval tv_cancel = tv_begin;
-
-@@ -113,10 +115,18 @@ void ProcessWork(ares_channel_t *channel,
- tv_cancel.tv_sec += (cancel_ms / 1000);
- tv_cancel.tv_usec += ((cancel_ms % 1000) * 1000);
- }
-+#else
-+ if (cancel_ms) {
-+ std::cerr << "library built with symbol hiding, can't test with cancel support" << std::endl;
-+ return;
-+ }
-+#endif
-
- while (true) {
-+#ifndef CARES_SYMBOL_HIDING
- struct timeval tv_now = ares__tvnow();
- struct timeval tv_remaining;
-+#endif
- struct timeval tv;
- struct timeval *tv_select;
-
-@@ -142,6 +152,7 @@ void ProcessWork(ares_channel_t *channel,
- if (tv_select == NULL)
- return;
-
-+#ifndef CARES_SYMBOL_HIDING
- if (cancel_ms) {
- unsigned int remaining_ms;
- ares__timeval_remaining(&tv_remaining,
-@@ -157,6 +168,7 @@ void ProcessWork(ares_channel_t *channel,
- tv_select = ares_timeout(channel, &tv_remaining, &tv);
- }
- }
-+#endif
-
- count = select(nfds, &readers, &writers, nullptr, tv_select);
- if (count < 0) {
-