*/
#include <openssl/crypto.h>
+#include <internal/cryptlib.h>
#if defined(OPENSSL_THREADS) && !defined(CRYPTO_TDEBUG) && !defined(OPENSSL_SYS_WINDOWS)
}
# else
pthread_mutexattr_t attr;
-
CRYPTO_RWLOCK *lock = OPENSSL_zalloc(sizeof(pthread_mutex_t));
if (lock == NULL)
return NULL;
return 1;
}
+int openssl_init_fork_handlers(void)
+{
+# ifdef OPENSSL_SYS_UNIX
+ if (pthread_atfork(OPENSSL_fork_prepare,
+ OPENSSL_fork_parent, OPENSSL_fork_child) == 0)
+ return 1;
+# endif
+ return 0;
+}
#endif