diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-02-16 05:36:19 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-02-16 05:36:19 +0000 |
commit | 54e81d21e857dacf1a3e888302bd66756433c2f2 (patch) | |
tree | 88a49aec64bdcec1da2be3004fae80bc6b245fb2 /test | |
parent | 80753368c1603ac969dd853f1bd61e7d6226052d (diff) |
fix building on non-mmu hosts
Diffstat (limited to 'test')
-rw-r--r-- | test/test-skeleton.c | 8 |
1 files changed, 8 insertions, 0 deletions
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); |