diff options
Diffstat (limited to 'common/library.c')
-rw-r--r-- | common/library.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/common/library.c b/common/library.c index b72465b..73a008c 100644 --- a/common/library.c +++ b/common/library.c @@ -145,12 +145,14 @@ extern int __register_atfork (void (*prepare) (void), void (*parent) (void), #ifdef HAVE___REGISTER_ATFORK -#define p11_register_atfork(a,b,c,d) \ - (__register_atfork((a),(b),(c),(d))) +extern void *__dso_handle; + +#define p11_register_atfork(a,b,c) \ + (__register_atfork((a),(b),(c),__dso_handle)) #else -#define p11_register_atfork(a,b,c,d) \ +#define p11_register_atfork(a,b,c) \ (pthread_atfork((a),(b),(c))) #endif /* HAVE___REGISTER_ATFORK */ @@ -177,7 +179,7 @@ p11_library_init_impl (void) p11_message_locale = newlocale (LC_ALL_MASK, "POSIX", (locale_t) 0); #endif - p11_register_atfork (NULL, NULL, count_forks, NULL); + p11_register_atfork (NULL, NULL, count_forks); } void |