summaryrefslogtreecommitdiff
path: root/libc/stdio/popen.c
diff options
context:
space:
mode:
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;