summaryrefslogtreecommitdiff
path: root/libc/stdio/popen.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-02-21 18:11:47 +0000
committerEric Andersen <andersen@codepoet.org>2002-02-21 18:11:47 +0000
commite4a1f78e73c8edab487abbf5540990d62f95a666 (patch)
tree043e9d7662ad87bf090f5920bd85bf3cf1b5ae20 /libc/stdio/popen.c
parentb0cc86a6fc6fc98d18e3bc232f1d83973d74cb3d (diff)
When vfork is not available and we have an MMU, then use fork()
-Erik
Diffstat (limited to 'libc/stdio/popen.c')
-rw-r--r--libc/stdio/popen.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libc/stdio/popen.c b/libc/stdio/popen.c
index 0a91f0e22..cddc9d6c4 100644
--- a/libc/stdio/popen.c
+++ b/libc/stdio/popen.c
@@ -12,6 +12,12 @@
#include <sys/wait.h>
#include <errno.h>
+/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
+#include <sys/syscall.h>
+#if ! defined __NR_vfork && defined __UCLIBC_HAS_MMU__
+#define vfork fork
+#endif
+
FILE *popen (const char *command, const char *mode)
{
FILE *fp;