summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mpc-impl.h4
-rw-r--r--tests/random.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/mpc-impl.h b/src/mpc-impl.h
index 88a49d8..1293273 100644
--- a/src/mpc-impl.h
+++ b/src/mpc-impl.h
@@ -28,8 +28,10 @@ along with this program. If not, see http://www.gnu.org/licenses/ .
#define __MPC_WITHIN_MPC 1
#endif
-#include <stdlib.h>
#include "config.h"
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#include "mpc.h"
#define MPC_RE(x) ((x)->re)
diff --git a/tests/random.c b/tests/random.c
index d5f44c4..61deb4d 100644
--- a/tests/random.c
+++ b/tests/random.c
@@ -22,11 +22,10 @@ along with this program. If not, see http://www.gnu.org/licenses/ .
test_end at the end.
These are an adaptation of those of MPFR. */
+#include "config.h"
#include <stdlib.h>
-
#include "mpc-tests.h"
-#include "config.h"
#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>