diff options
author | Gopal Sharma <67860577+gsharma-ad@users.noreply.github.com> | 2023-12-19 11:44:42 +0530 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-12-22 14:14:37 +0100 |
commit | aa50768bf6d0a987028175c4a3cac8a142b15941 (patch) | |
tree | f35aa6e46e865e64d663ff1c080348b3a626b801 /include/internal | |
parent | 7b71e83155269802220daf93381d4ecafcc8cfa4 (diff) |
Fixed windows compilation issue
Fixed - Windows compilation issue - unbale to find correct definitions of _InterlockedExchangeAdd.
Issue number - https://github.com/openssl/openssl/issues/21080
CLA: trivial
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23087)
Diffstat (limited to 'include/internal')
-rw-r--r-- | include/internal/refcount.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/internal/refcount.h b/include/internal/refcount.h index 3392d3b490..64fb77fba5 100644 --- a/include/internal/refcount.h +++ b/include/internal/refcount.h @@ -134,14 +134,14 @@ static __inline int CRYPTO_DOWN_REF(volatile int *val, int *ret, static __inline int CRYPTO_UP_REF(volatile int *val, int *ret, ossl_unused void *lock) { - *ret = _InterlockedExchangeAdd(val, 1) + 1; + *ret = _InterlockedExchangeAdd((long volatile *)val, 1) + 1; return 1; } static __inline int CRYPTO_DOWN_REF(volatile int *val, int *ret, ossl_unused void *lock) { - *ret = _InterlockedExchangeAdd(val, -1) - 1; + *ret = _InterlockedExchangeAdd((long volatile *)val, -1) - 1; return 1; } # endif |