contrib: gnutls: disable getentropy in gnutls configure
authorDavid Fuhrmann <dfuhrmann@videolan.org>
Wed, 9 Aug 2017 19:39:33 +0000 (21:39 +0200)
committerDavid Fuhrmann <dfuhrmann@videolan.org>
Wed, 9 Aug 2017 20:06:20 +0000 (22:06 +0200)
getentropy has been introduced only in 10.12, so it is not
available on earlier osx versions. As VLC will support up to 10.7,
disable the check.

refs #18476

contrib/src/gnutls/gnutls-disable-getentropy-osx.patch [new file with mode: 0644]
contrib/src/gnutls/rules.mak

diff --git a/contrib/src/gnutls/gnutls-disable-getentropy-osx.patch b/contrib/src/gnutls/gnutls-disable-getentropy-osx.patch
new file mode 100644 (file)
index 0000000..fee755c
--- /dev/null
@@ -0,0 +1,20 @@
+--- gnutls/configure.ac        2016-07-05 18:34:43.000000000 +0200
++++ gnutls.new/configure.ac    2017-08-09 21:57:44.000000000 +0200
+@@ -175,6 +175,9 @@
+                  enable_getrandom=getrandom],
+                 [AC_MSG_RESULT(no)])
++if test "$have_macosx" = "yes"; then
++AC_MSG_CHECKING([for getentropy disabled for OSX])
++else
+ AC_MSG_CHECKING([for getentropy])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([
+          #include <unistd.h>],[
+@@ -184,6 +187,7 @@
+                  AC_DEFINE([HAVE_GETENTROPY], 1, [Enable the OpenBSD getentropy function])
+                  enable_getrandom=getentropy],
+                 [AC_MSG_RESULT(no)])
++fi
+ dnl Try the hooks.m4
+ LIBGNUTLS_HOOKS
index d9b2b2e..41ba844 100644 (file)
@@ -37,6 +37,7 @@ endif
        $(APPLY) $(SRC)/gnutls/mac-keychain-lookup.patch
 ifdef HAVE_MACOSX
        $(APPLY) $(SRC)/gnutls/gnutls-pkgconfig-osx.patch
+       $(APPLY) $(SRC)/gnutls/gnutls-disable-getentropy-osx.patch
 endif
        $(APPLY) $(SRC)/gnutls/gnutls-libidn.patch
        $(call pkg_static,"lib/gnutls.pc.in")