Avoid linking error for InitializeCriticalSectionAndSpinCount().
Replace it with InitializeCriticalSection() Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8596)
This commit is contained in:
parent
88ffc8dea4
commit
09305a7d0a
1 changed files with 4 additions and 0 deletions
|
@ -24,11 +24,15 @@ CRYPTO_RWLOCK *CRYPTO_THREAD_lock_new(void)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#if !defined(_WIN32_WCE)
|
||||
/* 0x400 is the spin count value suggested in the documentation */
|
||||
if (!InitializeCriticalSectionAndSpinCount(lock, 0x400)) {
|
||||
OPENSSL_free(lock);
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
InitializeCriticalSection(lock);
|
||||
#endif
|
||||
|
||||
return lock;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue