aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/psim.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/ppc/psim.c')
-rw-r--r--sim/ppc/psim.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sim/ppc/psim.c b/sim/ppc/psim.c
index 66c54ed..03b57fe 100644
--- a/sim/ppc/psim.c
+++ b/sim/ppc/psim.c
@@ -24,22 +24,32 @@
#include <stdio.h>
#include <ctype.h>
-#include <stdlib.h>
#include "config.h"
#include "ppc-config.h"
#include "inline.h"
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
#ifndef STATIC_INLINE_PSIM
#define STATIC_INLINE_PSIM STATIC_INLINE
#endif
-#include <string.h>
#include <setjmp.h>
#include "cpu.h" /* includes psim.h */
#include "idecode.h"
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+
#include "bfd.h"