From 54e81d21e857dacf1a3e888302bd66756433c2f2 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 16 Feb 2006 05:36:19 +0000 Subject: fix building on non-mmu hosts --- test/test-skeleton.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/test-skeleton.c b/test/test-skeleton.c index 1b6ae1263..f4e9d856e 100644 --- a/test/test-skeleton.c +++ b/test/test-skeleton.c @@ -193,17 +193,23 @@ timeout_handler (int sig __attribute__ ((unused))) int main (int argc, char *argv[]) { +#ifdef __ARCH_HAS_MMU__ int direct = 0; /* Directly call the test function? */ +#else + int direct = 1; +#endif int status; int opt; unsigned int timeoutfactor = 1; pid_t termpid; /* Make uses of freed and uninitialized memory known. */ +#ifdef __ARCH_HAS_MMU__ #ifndef M_PERTURB # define M_PERTURB -6 #endif mallopt (M_PERTURB, 42); +#endif #ifdef STDOUT_UNBUFFERED setbuf (stdout, NULL); @@ -281,6 +287,7 @@ main (int argc, char *argv[]) - set up the timer - fork and execute the function. */ +#ifdef __UCLIBC_HAS_MMU__ pid = fork (); if (pid == 0) { @@ -318,6 +325,7 @@ main (int argc, char *argv[]) exit (TEST_FUNCTION); } else if (pid < 0) +#endif { perror ("Cannot fork test program"); exit (1); -- cgit v1.2.3