From e3efc9230c2f192e2738cee733c6d4fa20a2be2a Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 12 Apr 2004 17:59:24 +0000 Subject: Jamie Guinan writes: It looks like latest uClibc defines ARCH_HAS_MMU, but a few busybox files test UCLIBC_HAS_MMU, resulting in vfork() getting called instead of fork(), etc. Patch below. Only tested for lash. Cheers, -Jamie --- shell/hush.c | 4 ++-- shell/lash.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'shell') diff --git a/shell/hush.c b/shell/hush.c index ad5ddf0d5..8f4cc9780 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -1439,7 +1439,7 @@ static int run_pipe_real(struct pipe *pi) } /* XXX test for failed fork()? */ -#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__) +#if !defined(__UCLIBC__) || defined(__ARCH_HAS_MMU__) if (!(child->pid = fork())) #else if (!(child->pid = vfork())) @@ -2258,7 +2258,7 @@ FILE *generate_stream_from_list(struct pipe *head) #if 1 int pid, channel[2]; if (pipe(channel)<0) bb_perror_msg_and_die("pipe"); -#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__) +#if !defined(__UCLIBC__) || defined(__ARCH_HAS_MMU__) pid=fork(); #else pid=vfork(); diff --git a/shell/lash.c b/shell/lash.c index b46cee807..fa416c742 100644 --- a/shell/lash.c +++ b/shell/lash.c @@ -1380,7 +1380,7 @@ static int run_command(struct job *newjob, int inbg, int outpipe[2]) } } -#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__) +#if !defined(__UCLIBC__) || defined(__ARCH_HAS_MMU__) if (!(child->pid = fork())) #else if (!(child->pid = vfork())) -- cgit v1.2.3