git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #108009 from nima2007/mcrypt1

mcrypt: patch to include stdlib.h instead of malloc.h to build on darwin

commit922b04180954e3bf468e40b9f8666a2735365c8b authorPavol Rusnak <pavol@rusnak.io> dateFri 8 Jan 2021, 13:19 (6 years ago) parentf274df0dcc390f
2 files changed+28−1
pkgs/tools/misc/mcrypt/default.nix+2−1 pkgs/tools/misc/mcrypt/malloc_to_stdlib.patch+26
pkgs/tools/misc/mcrypt/default.nix+2−1
@@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
1414 ./overflow_CVE-2012-4409.patch
1515 ./segv.patch
1616 ./sprintf_CVE-2012-4527.patch
17+ ./malloc_to_stdlib.patch
1718 ];
1819
1920 buildInputs = [ libmcrypt libmhash ];
@@ -26,7 +27,7 @@ stdenv.mkDerivation rec {
2627 ever-wider range of algorithms and modes.
2728 '';
2829 homepage = "http://mcrypt.sourceforge.net";
29− license = stdenv.lib.licenses.gpl2;
30+ license = stdenv.lib.licenses.gpl3Only;
3031 platforms = stdenv.lib.platforms.all;
3132 maintainers = [ stdenv.lib.maintainers.qknight ];
3233 };
pkgs/tools/misc/mcrypt/malloc_to_stdlib.patchnew file+26
@@ -0,0 +1,26 @@
1+From e295844e8ef5c13487996ab700e5f12a7fadb1a6 Mon Sep 17 00:00:00 2001
2+From: Nima Vasseghi <nmv@fb.com>
3+Date: Wed, 30 Dec 2020 16:06:46 -0800
4+Subject: [PATCH] malloc.h to stdlib.h in rfc2440.c
5+
6+The malloc.h is deprecated and should not be used
7+---
8+ src/rfc2440.c | 2 +-
9+ 1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+diff --git a/src/rfc2440.c b/src/rfc2440.c
12+index 5a1f296..4d6a5db 100644
13+--- a/src/rfc2440.c
14++++ b/src/rfc2440.c
15+@@ -23,7 +23,7 @@
16+ #include <zlib.h>
17+ #endif
18+ #include <stdio.h>
19+-#include <malloc.h>
20++#include <stdlib.h>
21+
22+ #include "xmalloc.h"
23+ #include "keys.h"
24+--
25+2.13.5
26+