diff options
Diffstat (limited to 'common/library.c')
-rw-r--r-- | common/library.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/common/library.c b/common/library.c index e8547b3..48fd0c9 100644 --- a/common/library.c +++ b/common/library.c @@ -159,11 +159,8 @@ _p11_library_get_thread_local (void) return local; } -#ifdef __GNUC__ -__attribute__((constructor)) -#endif void -p11_library_init (void) +p11_library_init_impl (void) { p11_debug_init (); p11_debug ("initializing library"); @@ -172,6 +169,15 @@ p11_library_init (void) } #ifdef __GNUC__ +__attribute__((constructor)) +#endif +void +p11_library_init (void) +{ + p11_library_init_once (); +} + +#ifdef __GNUC__ __attribute__((destructor)) #endif void |