fix gmp on darwin

+20
+2
pkgs/development/libraries/gmp/5.1.x.nix
··· 12 12 13 13 nativeBuildInputs = [ m4 ]; 14 14 15 + patches = if stdenv.isDarwin then [ ./need-size-t.patch ] else null; 16 + 15 17 configureFlags = 16 18 # Build a "fat binary", with routines for several sub-architectures 17 19 # (x86), except on Solaris where some tests crash with "Memory fault".
+18
pkgs/development/libraries/gmp/need-size-t.patch
··· 1 + diff --git a/gmp-h.in b/gmp-h.in 2 + index 7deb67a..240d663 100644 3 + --- a/gmp-h.in 4 + +++ b/gmp-h.in 5 + @@ -46,13 +46,11 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ 6 + #ifndef __GNU_MP__ 7 + #define __GNU_MP__ 5 8 + 9 + -#define __need_size_t /* tell gcc stddef.h we only want size_t */ 10 + #if defined (__cplusplus) 11 + #include <cstddef> /* for size_t */ 12 + #else 13 + #include <stddef.h> /* for size_t */ 14 + #endif 15 + -#undef __need_size_t 16 + 17 + /* Instantiated by configure. */ 18 + #if ! defined (__GMP_WITHIN_CONFIGURE)