diff options
Diffstat (limited to 'src/streams/openssl.c')
| -rw-r--r-- | src/streams/openssl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/streams/openssl.c b/src/streams/openssl.c index 56164bf25..2b246002f 100644 --- a/src/streams/openssl.c +++ b/src/streams/openssl.c @@ -150,11 +150,20 @@ int git_openssl_stream_global_init(void) return 0; } +#if defined(GIT_THREADS) +static void threadid_cb(CRYPTO_THREADID *threadid) +{ + CRYPTO_THREADID_set_numeric(threadid, git_thread_currentid()); +} +#endif + int git_openssl_set_locking(void) { #if defined(GIT_THREADS) && OPENSSL_VERSION_NUMBER < 0x10100000L int num_locks, i; + CRYPTO_THREADID_set_callback(threadid_cb); + num_locks = CRYPTO_num_locks(); openssl_locks = git__calloc(num_locks, sizeof(git_mutex)); GITERR_CHECK_ALLOC(openssl_locks); |
