From 416d2de60b8e567ac7cd6a581afba0f5cdfc932e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 31 Dec 2002 08:00:19 +0000 Subject: Update. 2002-12-30 Ulrich Drepper * malloc/thread-m.h (thread_atfork): Define using __register_atfork. --- malloc/thread-m.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'malloc') diff --git a/malloc/thread-m.h b/malloc/thread-m.h index 49db784c52..d3352d1fe5 100644 --- a/malloc/thread-m.h +++ b/malloc/thread-m.h @@ -72,8 +72,14 @@ __libc_lock_define (typedef, mutex_t) #endif +/* This is defined by newer gcc version unique for each module. */ +extern void *__dso_handle __attribute__ ((__weak__)); + +#include + #define thread_atfork(prepare, parent, child) \ - (__pthread_atfork != NULL ? __pthread_atfork(prepare, parent, child) : 0) + __register_atfork (prepare, parent, child, \ + &__dso_handle == NULL ? NULL : __dso_handle) #elif defined(MUTEX_INITIALIZER) /* Assume hurd, with cthreads */ -- cgit v1.2.3