--- a/configure
+++ b/configure
@@ -4704,6 +4704,7 @@ $as_echo_n "checking build system compil
 # remove anything that might look like compiler output to our "||" expression
 rm -f conftest* a.out b.out a.exe a_out.exe
 cat >conftest.c <<EOF
+#include <stdlib.h>
 int
 main ()
 {
@@ -4736,6 +4737,7 @@ $as_echo_n "checking build system compil
 # remove anything that might look like compiler output to our "||" expression
 rm -f conftest* a.out b.out a.exe a_out.exe
 cat >conftest.c <<EOF
+#include <stdlib.h>
 int
 main ()
 {
@@ -4772,6 +4774,7 @@ $as_echo_n "checking build system compil
 # remove anything that might look like compiler output to our "||" expression
 rm -f conftest* a.out b.out a.exe a_out.exe
 cat >conftest.c <<EOF
+#include <stdlib.h>
 int
 main ()
 {
@@ -4822,6 +4825,7 @@ else
   gmp_cv_prog_exeext_for_build="$EXEEXT"
 else
   cat >conftest.c <<EOF
+#include <stdlib.h>
 int
 main ()
 {
