diff options
Diffstat (limited to 'sim/ppc/emul_netbsd.c')
-rw-r--r-- | sim/ppc/emul_netbsd.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/sim/ppc/emul_netbsd.c b/sim/ppc/emul_netbsd.c index e7d09c3..1a05f0a 100644 --- a/sim/ppc/emul_netbsd.c +++ b/sim/ppc/emul_netbsd.c @@ -22,14 +22,21 @@ #ifndef _EMUL_NETBSD_C_ #define _EMUL_NETBSD_C_ +#include "emul_generic.h" + +#ifdef HAVE_STRING_H +#include <string.h> +#else +#ifdef HAVE_STRINGS_H +#include <strings.h> +#endif +#endif + #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> -#include <stdlib.h> -#include <unistd.h> #include <signal.h> #include <fcntl.h> -#include <string.h> #include <sys/errno.h> #include <sys/param.h> #include <sys/time.h> @@ -38,6 +45,14 @@ #include <sys/mount.h> #include <sys/dirent.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + #define WITH_NetBSD_HOST (NetBSD >= 199306) #if WITH_NetBSD_HOST /* here NetBSD as that is what we're emulating */ #include <sys/syscall.h> /* FIXME - should not be including this one */ @@ -49,9 +64,6 @@ extern int getdirentries(int fd, char *buf, int nbytes, long *basep); extern int errno; #endif -#include "emul_generic.h" - - #ifndef STATIC_INLINE_EMUL_NETBSD #define STATIC_INLINE_EMUL_NETBSD STATIC_INLINE #endif |