diff --git a/lib/libkse/thread/thr_fork.c b/lib/libkse/thread/thr_fork.c index 6989174509eb..401aae9e1883 100644 --- a/lib/libkse/thread/thr_fork.c +++ b/lib/libkse/thread/thr_fork.c @@ -39,9 +39,14 @@ #include #include #include + +#include "libc_private.h" #include "thr_private.h" -extern spinlock_t *__malloc_lock; +/* + * For a while, allow libpthread to work with a libc that doesn't + * export the malloc lock. + */ #pragma weak __malloc_lock __weak_reference(_fork, fork); diff --git a/lib/libpthread/thread/thr_fork.c b/lib/libpthread/thread/thr_fork.c index 6989174509eb..401aae9e1883 100644 --- a/lib/libpthread/thread/thr_fork.c +++ b/lib/libpthread/thread/thr_fork.c @@ -39,9 +39,14 @@ #include #include #include + +#include "libc_private.h" #include "thr_private.h" -extern spinlock_t *__malloc_lock; +/* + * For a while, allow libpthread to work with a libc that doesn't + * export the malloc lock. + */ #pragma weak __malloc_lock __weak_reference(_fork, fork);