From 9e38e0aa45cca21d5023d0af94377f0e1e41d2f4 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 19 Nov 2017 09:10:12 +0100 Subject: linuxthreads: add dummy for pthread_atfork For noMMU targets we need a pthread_atfork dummy, otherwise libraries like libressl using pthread_atfork, but not fork() for itself, can not be used. But software like curl with ssl support linking against libressl still work fine on noMMU targets. --- libpthread/linuxthreads/ptfork.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- cgit v1.2.3