We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 494a2f2 + 2d2e70f commit 344b4eaCopy full SHA for 344b4ea
src/streams/openssl.c
@@ -150,11 +150,20 @@ int git_openssl_stream_global_init(void)
150
return 0;
151
}
152
153
+#if defined(GIT_THREADS)
154
+static void threadid_cb(CRYPTO_THREADID *threadid)
155
+{
156
+ CRYPTO_THREADID_set_numeric(threadid, git_thread_currentid());
157
+}
158
+#endif
159
+
160
int git_openssl_set_locking(void)
161
{
162
#if defined(GIT_THREADS) && OPENSSL_VERSION_NUMBER < 0x10100000L
163
int num_locks, i;
164
165
+ CRYPTO_THREADID_set_callback(threadid_cb);
166
167
num_locks = CRYPTO_num_locks();
168
openssl_locks = git__calloc(num_locks, sizeof(git_mutex));
169
GITERR_CHECK_ALLOC(openssl_locks);
0 commit comments