summaryrefslogtreecommitdiff
path: root/net-dns/c-ares/files/c-ares-1.24.0-getrandom.patch
diff options
context:
space:
mode:
Diffstat (limited to 'net-dns/c-ares/files/c-ares-1.24.0-getrandom.patch')
-rw-r--r--net-dns/c-ares/files/c-ares-1.24.0-getrandom.patch80
1 files changed, 0 insertions, 80 deletions
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 {