From eada1efcaf09becb719d5278e4bf46e34e9693eb Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Wed, 21 Feb 1996 16:47:06 +0000 Subject: Update to 1995-02-20 release --- sim/ppc/emul_netbsd.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'sim/ppc/emul_netbsd.c') diff --git a/sim/ppc/emul_netbsd.c b/sim/ppc/emul_netbsd.c index 6db39a4..27de365 100644 --- a/sim/ppc/emul_netbsd.c +++ b/sim/ppc/emul_netbsd.c @@ -45,8 +45,17 @@ #include #include #include + +#ifdef HAVE_GETRUSAGE +#ifndef HAVE_SYS_RESOURCE_H +#undef HAVE_GETRUSAGE +#endif +#endif + +#ifdef HAVE_GETRUSAGE #include int getrusage(); +#endif #include #include @@ -224,6 +233,7 @@ write_direntries(unsigned_word addr, #endif +#ifdef HAVE_GETRUSAGE STATIC_INLINE_EMUL_NETBSD void write_rusage(unsigned_word addr, struct rusage rusage, @@ -250,7 +260,7 @@ write_rusage(unsigned_word addr, H2T(rusage.ru_nivcsw); /* involuntary context switches */ emul_write_buffer(&rusage, addr, sizeof(rusage), processor, cia); } - +#endif static void do_exit(os_emul_data *emul, @@ -648,6 +658,9 @@ do_gettimeofday(os_emul_data *emul, } +#ifndef HAVE_GETRUSAGE +#define do_getrusage 0 +#else static void do_getrusage(os_emul_data *emul, unsigned call, @@ -670,6 +683,7 @@ do_getrusage(os_emul_data *emul, write_rusage(rusage_addr, rusage, processor, cia); } } +#endif #if !WITH_NetBSD_HOST @@ -1277,7 +1291,8 @@ emul_netbsd_create(device *root, /* options */ emul_add_tree_options(root, image, "netbsd", (WITH_ENVIRONMENT == USER_ENVIRONMENT - ? "user" : "virtual")); + ? "user" : "virtual"), + 0 /*oea-interrupt-prefix*/); /* virtual memory - handles growth of stack/heap */ vm = device_tree_add_parsed(root, "/openprom/vm@0x%lx", -- cgit v1.1