fix gmp on darwin
This commit is contained in:
parent
4a467ec02b
commit
cbd446d465
|
@ -12,6 +12,8 @@ stdenv.mkDerivation (rec {
|
||||||
|
|
||||||
nativeBuildInputs = [ m4 ];
|
nativeBuildInputs = [ m4 ];
|
||||||
|
|
||||||
|
patches = if stdenv.isDarwin then [ ./need-size-t.patch ] else null;
|
||||||
|
|
||||||
configureFlags =
|
configureFlags =
|
||||||
# Build a "fat binary", with routines for several sub-architectures
|
# Build a "fat binary", with routines for several sub-architectures
|
||||||
# (x86), except on Solaris where some tests crash with "Memory fault".
|
# (x86), except on Solaris where some tests crash with "Memory fault".
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
diff --git a/gmp-h.in b/gmp-h.in
|
||||||
|
index 7deb67a..240d663 100644
|
||||||
|
--- a/gmp-h.in
|
||||||
|
+++ b/gmp-h.in
|
||||||
|
@@ -46,13 +46,11 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
|
||||||
|
#ifndef __GNU_MP__
|
||||||
|
#define __GNU_MP__ 5
|
||||||
|
|
||||||
|
-#define __need_size_t /* tell gcc stddef.h we only want size_t */
|
||||||
|
#if defined (__cplusplus)
|
||||||
|
#include <cstddef> /* for size_t */
|
||||||
|
#else
|
||||||
|
#include <stddef.h> /* for size_t */
|
||||||
|
#endif
|
||||||
|
-#undef __need_size_t
|
||||||
|
|
||||||
|
/* Instantiated by configure. */
|
||||||
|
#if ! defined (__GMP_WITHIN_CONFIGURE)
|
Loading…
Reference in New Issue