toolchain: fix compilation of GMP on FreeBSD

Built on FreeBSD -CURRENT
Obtained from FreeBSD: bbedec80e3

Change-Id: Ic6b6db8e3a9d86a30c50a09d58566846446031ea
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-on: https://review.coreboot.org/18675
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Idwer Vollering 2017-03-08 15:31:22 +01:00 committed by Nico Huber
parent 7129ccbd23
commit 171d1a5979
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
--- gmp-6.1.2.orig/configure 2016-12-16 16:45:32.000000000 +0100
+++ gmp-6.1.2/configure 2017-03-08 14:26:11.194245000 +0100
@@ -6776,7 +6776,7 @@
long i;
for (i = 0; i < 88 + 1; i++)
a[i] = ~0L;
- r = malloc (10000 * sizeof (unsigned long));
+ r = calloc (10000, sizeof (unsigned long));
r2 = r;
for (i = 0; i < 528; i += 23)
{
@@ -8394,7 +8394,7 @@
long i;
for (i = 0; i < 88 + 1; i++)
a[i] = ~0L;
- r = malloc (10000 * sizeof (unsigned long));
+ r = calloc (10000, sizeof (unsigned long));
r2 = r;
for (i = 0; i < 528; i += 23)
{