aboutsummaryrefslogtreecommitdiff
path: root/tools/depends/target/gnutls
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2018-02-04 13:00:00 +0100
committerRechi <Rechi@users.noreply.github.com>2018-02-04 13:00:00 +0100
commitf1689018ba734d905e85855bffde389e00b892de (patch)
treebc436456b02294dd6047823cdf6208e0a4dc6eae /tools/depends/target/gnutls
parentff58732c989c71f9a15df03252aa8ad97e336a42 (diff)
[depends] gnutls: don't use getentropy on darwin systems
Diffstat (limited to 'tools/depends/target/gnutls')
-rw-r--r--tools/depends/target/gnutls/02-darwin-getentropy.patch18
-rw-r--r--tools/depends/target/gnutls/Makefile7
2 files changed, 21 insertions, 4 deletions
diff --git a/tools/depends/target/gnutls/02-darwin-getentropy.patch b/tools/depends/target/gnutls/02-darwin-getentropy.patch
new file mode 100644
index 0000000000..300490c12f
--- /dev/null
+++ b/tools/depends/target/gnutls/02-darwin-getentropy.patch
@@ -0,0 +1,18 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -220,6 +220,7 @@
+ rnd_variant=getrandom],
+ [AC_MSG_RESULT(no)])
+
++if test "x$have_macosx" != "xyes"; then
+ AC_MSG_CHECKING([for getentropy])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([
+ #include <unistd.h>
+@@ -233,6 +234,7 @@
+ AC_DEFINE([HAVE_GETENTROPY], 1, [Enable the OpenBSD getentropy function])
+ rnd_variant=getentropy],
+ [AC_MSG_RESULT(no)])
++fi
+
+ AM_CONDITIONAL(HAVE_GETENTROPY, test "$rnd_variant" = "getentropy")
+
diff --git a/tools/depends/target/gnutls/Makefile b/tools/depends/target/gnutls/Makefile
index 7662b491ca..5464073ca5 100644
--- a/tools/depends/target/gnutls/Makefile
+++ b/tools/depends/target/gnutls/Makefile
@@ -1,5 +1,5 @@
include ../../Makefile.include
-DEPS= ../../Makefile.include Makefile size-max.patch
+DEPS= ../../Makefile.include Makefile size-max.patch 02-darwin-getentropy.patch
# lib name, version
LIBNAME=gnutls
@@ -33,10 +33,9 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
cd $(PLATFORM); patch -p0 < ../size-max.patch
+ cd $(PLATFORM); patch -p1 -i ../02-darwin-getentropy.patch
+ cd $(PLATFORM); $(AUTORECONF) -vif
cd $(PLATFORM); $(CONFIGURE)
-ifeq (darwin, $(findstring darwin, $(HOST)))
- cd $(PLATFORM); sed -ie "s/HAVE_GETENTROPY/HAVE_GETENTROPY_NOPE/" config.h
-endif
$(LIBDYLIB): $(PLATFORM)
$(MAKE) -C $(PLATFORM)