Commit 916704b3 authored by Soujyu Tanaka's avatar Soujyu Tanaka Committed by Matt Caswell
Browse files

Avoid linking error for InitializeCriticalSectionAndSpinCount().


Replace it with InitializeCriticalSection()

Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8596)

(cherry picked from commit 09305a7d)
parent 1914fddd
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;
}