summaryrefslogtreecommitdiff
path: root/librt
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-03-26 23:41:25 -0400
committerMike Frysinger <vapier@gentoo.org>2012-03-26 23:42:24 -0400
commite2a32f75141fe523df98f4e25186391b345668d0 (patch)
tree0204c868178d9b3aff55556db9b446ffd2898b5e /librt
parentd8b4e7a80cb92b7d4562ca78f65ba42b418ea438 (diff)
spawn: fix building on no-mmu systems
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@gentoo.org>
Diffstat (limited to 'librt')
-rw-r--r--librt/spawn.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/librt/spawn.c b/librt/spawn.c
index 0877f6f8e..07d40193c 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)