w3m: do not always link to RAND_egd for openssl

This fixes the build for libressl >= 2.3 as RAND_egd has been removed as
it is insecure.
This commit is contained in:
Robin Gloster 2015-11-26 12:49:01 +00:00
parent 99b1b464b4
commit f8ee267576
2 changed files with 12 additions and 1 deletions

View file

@ -0,0 +1,11 @@
--- a/url.c 2014-07-14 12:31:30.476563116 +0200
+++ b/url.c 2014-07-14 12:32:16.364918248 +0200
@@ -268,7 +268,7 @@ init_PRNG()
if (RAND_status())
return;
if ((file = RAND_file_name(buffer, sizeof(buffer)))) {
-#ifdef USE_EGD
+#if defined(USE_EGD) && defined(HAVE_SSL_RAND_EGD)
if (RAND_egd(file) > 0)
return;
#endif

View file

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lsocket -lnsl";
patches = [ ./glibc214.patch ]
patches = [ ./glibc214.patch ./RAND_egd.libressl.patch ]
# Patch for the newer unstable boehm-gc 7.2alpha. Not all platforms use that
# alpha. At the time of writing this, boehm-gc-7.1 is the last stable.
++ optional (boehmgc.name != "boehm-gc-7.1") [ ./newgc.patch ]