]> granicus.if.org Git - p11-kit/commitdiff
Revert "build: Link to libpthread, if pthread_atfork() needs to be used"
authorDaiki Ueno <dueno@redhat.com>
Fri, 17 Aug 2018 10:29:03 +0000 (12:29 +0200)
committerDaiki Ueno <ueno@gnu.org>
Fri, 17 Aug 2018 13:53:42 +0000 (15:53 +0200)
This reverts commit 541d79cb651cfd3238b9aa41fce70208df8e9496.

NEWS
common/library.c
configure.ac

diff --git a/NEWS b/NEWS
index 616face0edb2c5eaf8e41fcb8e7bab672e94fc89..ab8ff57e14af78a54861f2e2a88c1c3a42bb5d0e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,7 @@
  * server: Enable socket activation through systemd [PR#173]
  * rpc-server: p11_kit_remote_serve_tokens: Allow exporting all modules [PR#174]
  * proxy: Fail early if there is no slot mapping [PR#175]
- * Remove hard dependency on libpthread on glibc systems [PR#177]
+ * Remove hard dependency on libpthread [PR#177]
  * Build fixes [PR#170, PR#176]
 
 0.23.12 (stable)
index 73a008c43246eca5ba4a369f1ebc3e86a8f21694..b72465ba587a10c7969fc702d66f803df9d44610 100644 (file)
@@ -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
index dde0ea22fbb3c59e38453f393b763377f59b2e4b..93a6c83f6e64d0894582c1c2f80ce981b0d3194b 100644 (file)
@@ -123,12 +123,7 @@ if test "$os_unix" = "yes"; then
        AC_CHECK_FUNCS([setenv])
        AC_CHECK_FUNCS([getpeereid])
        AC_CHECK_FUNCS([getpeerucred])
-       # If __register_atfork() is not available, we have to link to
-       # libpthread so that the non-stub version of pthread_atfork() work
-       # FIXME: replace pthread_atfork() uses with manual PID checks
-       AC_CHECK_FUNCS([__register_atfork], , [
-               AC_CHECK_LIB([pthread], [pthread_atfork])
-       ])
+       AC_CHECK_FUNCS([__register_atfork])
        AC_CHECK_DECLS([__register_atfork])
 
        # Check if issetugid() is available and has compatible behavior with OpenBSD