[git commit] spawn: fix building on no-mmu systems

Mike Frysinger vapier at gentoo.org
Tue Mar 27 03:42:24 UTC 2012


commit: http://git.uclibc.org/uClibc/commit/?id=e2a32f75141fe523df98f4e25186391b345668d0
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

We don't have fork() on no-mmu, so if we're going to end up calling it,
return ENOSYS instead.

Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
 librt/spawn.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/librt/spawn.c b/librt/spawn.c
index 0877f6f..07d4019 100644
--- a/librt/spawn.c
+++ b/librt/spawn.c
@@ -120,8 +120,13 @@ __spawni(pid_t *pid, const char *file,
 	pid_t new_pid;
 	if (is_vfork_safe(flags) && !fa)
 		new_pid = vfork();
-	else
+	else {
+#ifdef __ARCH_USE_MMU__
 		new_pid = fork();
+#else
+		return ENOSYS;
+#endif
+	}
 
 	if (new_pid) {
 		if (new_pid < 0)


More information about the uClibc-cvs mailing list