From f8ee267576e08a24080b9bf0a95935326bcf2a2b Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 26 Nov 2015 12:49:01 +0000 Subject: [PATCH] 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. --- .../networking/browsers/w3m/RAND_egd.libressl.patch | 11 +++++++++++ pkgs/applications/networking/browsers/w3m/default.nix | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/networking/browsers/w3m/RAND_egd.libressl.patch diff --git a/pkgs/applications/networking/browsers/w3m/RAND_egd.libressl.patch b/pkgs/applications/networking/browsers/w3m/RAND_egd.libressl.patch new file mode 100644 index 000000000000..49dd417d1c39 --- /dev/null +++ b/pkgs/applications/networking/browsers/w3m/RAND_egd.libressl.patch @@ -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 diff --git a/pkgs/applications/networking/browsers/w3m/default.nix b/pkgs/applications/networking/browsers/w3m/default.nix index bea74f62358a..358f005a8782 100644 --- a/pkgs/applications/networking/browsers/w3m/default.nix +++ b/pkgs/applications/networking/browsers/w3m/default.nix @@ -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 ]