diff options
author | Soujyu Tanaka <soujyu.tanaka@access-company.com> | 2019-03-27 08:15:31 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2019-03-29 10:51:24 +0100 |
commit | 09305a7d0afcf9ae2d5be459ad6e6433ea85f913 (patch) | |
tree | aeeef00a8288c4cced2734600d92bacc0c74fc1e /crypto/threads_win.c | |
parent | Avoid linking error on WCE700 for _InterlockedExchangeAdd(). (diff) | |
download | openssl-09305a7d0afcf9ae2d5be459ad6e6433ea85f913.tar.xz openssl-09305a7d0afcf9ae2d5be459ad6e6433ea85f913.zip |
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)
Diffstat (limited to 'crypto/threads_win.c')
-rw-r--r-- | crypto/threads_win.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/threads_win.c b/crypto/threads_win.c index 47795435be..73203834c1 100644 --- a/crypto/threads_win.c +++ b/crypto/threads_win.c @@ -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; } |