summary refs log tree commit diff
diff options
context:
space:
mode:
authorNima <nmv@fb.com>2020-12-30 16:16:08 -0800
committerNima <nmv@fb.com>2020-12-30 16:20:12 -0800
commit3bf056aad3513111b38aa1723553277d7d757e16 (patch)
treeeada6db962f563c7bd1f1565461ed14e386f4ea3
parentff97a25fc6da512edf8fb32cf27f001e0d7382c0 (diff)
downloadnixpkgs-3bf056aad3513111b38aa1723553277d7d757e16.tar
nixpkgs-3bf056aad3513111b38aa1723553277d7d757e16.tar.gz
nixpkgs-3bf056aad3513111b38aa1723553277d7d757e16.tar.bz2
nixpkgs-3bf056aad3513111b38aa1723553277d7d757e16.tar.lz
nixpkgs-3bf056aad3513111b38aa1723553277d7d757e16.tar.xz
nixpkgs-3bf056aad3513111b38aa1723553277d7d757e16.tar.zst
nixpkgs-3bf056aad3513111b38aa1723553277d7d757e16.zip
mcrypt: patch to include stdlib.h instead of malloc.h to build on darwin
malloc.h is deprecated and the package does not compile on macOS due to this.
-rw-r--r--pkgs/tools/misc/mcrypt/default.nix1
-rwxr-xr-xpkgs/tools/misc/mcrypt/malloc_to_stdlib.patch26
2 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/tools/misc/mcrypt/default.nix b/pkgs/tools/misc/mcrypt/default.nix
index afbe811e7f2..03225710c51 100644
--- a/pkgs/tools/misc/mcrypt/default.nix
+++ b/pkgs/tools/misc/mcrypt/default.nix
@@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
     ./overflow_CVE-2012-4409.patch
     ./segv.patch
     ./sprintf_CVE-2012-4527.patch
+    ./malloc_to_stdlib.patch
   ];
 
   buildInputs = [ libmcrypt libmhash ];
diff --git a/pkgs/tools/misc/mcrypt/malloc_to_stdlib.patch b/pkgs/tools/misc/mcrypt/malloc_to_stdlib.patch
new file mode 100755
index 00000000000..e92f5a46ae7
--- /dev/null
+++ b/pkgs/tools/misc/mcrypt/malloc_to_stdlib.patch
@@ -0,0 +1,26 @@
+From e295844e8ef5c13487996ab700e5f12a7fadb1a6 Mon Sep 17 00:00:00 2001
+From: Nima Vasseghi <nmv@fb.com>
+Date: Wed, 30 Dec 2020 16:06:46 -0800
+Subject: [PATCH] malloc.h to stdlib.h in rfc2440.c
+
+The malloc.h is deprecated and should not be used
+---
+ src/rfc2440.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/rfc2440.c b/src/rfc2440.c
+index 5a1f296..4d6a5db 100644
+--- a/src/rfc2440.c
++++ b/src/rfc2440.c
+@@ -23,7 +23,7 @@
+ #include <zlib.h>
+ #endif
+ #include <stdio.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ 
+ #include "xmalloc.h"
+ #include "keys.h"
+-- 
+2.13.5
+