mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-26 02:05:02 +00:00
libtommath: expose mp_set_double on darwin
This commit is contained in:
14
pkgs/by-name/li/libtommath/force_mp_set_double.patch
Normal file
14
pkgs/by-name/li/libtommath/force_mp_set_double.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
diff --git a/bn_mp_set_double.c b/bn_mp_set_double.c
|
||||
index a42fc70..4a13539 100644
|
||||
--- a/bn_mp_set_double.c
|
||||
+++ b/bn_mp_set_double.c
|
||||
@@ -3,7 +3,8 @@
|
||||
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
|
||||
/* SPDX-License-Identifier: Unlicense */
|
||||
|
||||
-#if defined(__STDC_IEC_559__) || defined(__GCC_IEC_559)
|
||||
+#if defined(__STDC_IEC_559__) || defined(__GCC_IEC_559) || \
|
||||
+ (defined(__APPLE__) && defined(__aarch64__))
|
||||
mp_err mp_set_double(mp_int *a, double b)
|
||||
{
|
||||
uint64_t frac;
|
||||
@@ -14,6 +14,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
sha256 = "sha256-KWJy2TQ1mRMI63NgdgDANLVYgHoH6CnnURQuZcz6nQg=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./force_mp_set_double.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace makefile.shared \
|
||||
--replace-fail glibtool libtool \
|
||||
|
||||
Reference in New Issue
Block a user