diff options
author | Daiki Ueno <dueno@redhat.com> | 2018-08-17 12:29:15 +0200 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2018-08-17 15:53:42 +0200 |
commit | 56f3b9370747a7a33a9d56ff9365c89700dd0e67 (patch) | |
tree | 4257b0ac7fe8db22c21b86b6cb2fe524bbe2c168 | |
parent | a877b0eca3d59f7f8cd126047c0e899df6018858 (diff) |
Revert "common: Prefer __register_atfork() to pthread_atfork() if possible"
This reverts commit ce3cec7f8742254b8627b9db48973b81e91cbfc8.
-rw-r--r-- | common/library.c | 19 | ||||
-rw-r--r-- | configure.ac | 2 |
2 files changed, 1 insertions, 20 deletions
diff --git a/common/library.c b/common/library.c index b72465b..c1275f3 100644 --- a/common/library.c +++ b/common/library.c @@ -138,23 +138,6 @@ _p11_library_get_thread_local (void) } #endif -#if defined(HAVE_DECL___REGISTER_ATFORK) && !HAVE_DECL___REGISTER_ATFORK -extern int __register_atfork (void (*prepare) (void), void (*parent) (void), - void (*child) (void), void *dso_handle); -#endif /* HAVE_DECL___REGISTER_ATFORK */ - -#ifdef HAVE___REGISTER_ATFORK - -#define p11_register_atfork(a,b,c,d) \ - (__register_atfork((a),(b),(c),(d))) - -#else - -#define p11_register_atfork(a,b,c,d) \ - (pthread_atfork((a),(b),(c))) - -#endif /* HAVE___REGISTER_ATFORK */ - static void count_forks (void) { @@ -177,7 +160,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); + pthread_atfork (NULL, NULL, count_forks); } void diff --git a/configure.ac b/configure.ac index 93a6c83..28dd32d 100644 --- a/configure.ac +++ b/configure.ac @@ -123,8 +123,6 @@ if test "$os_unix" = "yes"; then AC_CHECK_FUNCS([setenv]) AC_CHECK_FUNCS([getpeereid]) AC_CHECK_FUNCS([getpeerucred]) - AC_CHECK_FUNCS([__register_atfork]) - AC_CHECK_DECLS([__register_atfork]) # Check if issetugid() is available and has compatible behavior with OpenBSD AC_CHECK_FUNCS([issetugid], [ |