summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2018-08-17 12:29:03 +0200
committerDaiki Ueno <ueno@gnu.org>2018-08-17 15:53:42 +0200
commita877b0eca3d59f7f8cd126047c0e899df6018858 (patch)
tree6023fc8e032d2a472e04344040f18699e71e3ec8 /common
parentf69746d140cec20516c223825523fb0ade53384a (diff)
Revert "build: Link to libpthread, if pthread_atfork() needs to be used"
This reverts commit 541d79cb651cfd3238b9aa41fce70208df8e9496.
Diffstat (limited to 'common')
-rw-r--r--common/library.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/common/library.c b/common/library.c
index 73a008c..b72465b 100644
--- a/common/library.c
+++ b/common/library.c
@@ -145,14 +145,12 @@ extern int __register_atfork (void (*prepare) (void), void (*parent) (void),
#ifdef HAVE___REGISTER_ATFORK
-extern void *__dso_handle;
-
-#define p11_register_atfork(a,b,c) \
- (__register_atfork((a),(b),(c),__dso_handle))
+#define p11_register_atfork(a,b,c,d) \
+ (__register_atfork((a),(b),(c),(d)))
#else
-#define p11_register_atfork(a,b,c) \
+#define p11_register_atfork(a,b,c,d) \
(pthread_atfork((a),(b),(c)))
#endif /* HAVE___REGISTER_ATFORK */
@@ -179,7 +177,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);
+ p11_register_atfork (NULL, NULL, count_forks, NULL);
}
void