summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads/ptfork.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/linuxthreads/ptfork.c')
-rw-r--r--libpthread/linuxthreads/ptfork.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libpthread/linuxthreads/ptfork.c b/libpthread/linuxthreads/ptfork.c
index 74d630830..a1bad3d54 100644
--- a/libpthread/linuxthreads/ptfork.c
+++ b/libpthread/linuxthreads/ptfork.c
@@ -150,4 +150,16 @@ static pid_t __fork(void)
strong_alias(__fork,fork)
strong_alias(__fork,vfork)
+#else
+
+/* We can't support pthread_atfork without MMU, since we don't have
+ fork(), and we can't offer the correct semantics for vfork().
+ But instead of failing, just provide a dummy */
+int pthread_atfork(void (*prepare)(void),
+ void (*parent)(void),
+ void (*child)(void))
+{
+ return 0;
+}
+
#endif