aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--thread_pthread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 0f62c6d603..b8be9bddc5 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -181,12 +181,14 @@ gvl_destroy(rb_vm_t *vm)
native_mutex_destroy(&vm->gvl.lock);
}
+#if defined(HAVE_WORKING_FORK)
static void
gvl_atfork(rb_vm_t *vm)
{
gvl_init(vm);
gvl_acquire(vm, GET_THREAD());
}
+#endif
#define NATIVE_MUTEX_LOCK_DEBUG 0