Skip to content

Commit b1cab70

Browse files
authored
streams: openssl: add missing check on OPENSSL_LEGACY_API
The `CRYPTO_THREADID` type is no longer available in OpenSSL ≥ 1.1.0 with deprecated features disabled, and causes build failures. Since the `threadid_cb()` function is only ever called by `git_openssl_set_locking()` when `defined(OPENSSL_LEGACY_API)`, only define it then.
1 parent 7f6c1ce commit b1cab70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/streams/openssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ int git_openssl_stream_global_init(void)
249249
return 0;
250250
}
251251

252-
#if defined(GIT_THREADS)
252+
#if defined(GIT_THREADS) && defined(OPENSSL_LEGACY_API)
253253
static void threadid_cb(CRYPTO_THREADID *threadid)
254254
{
255255
GIT_UNUSED(threadid);

0 commit comments

Comments
 (0)