summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGopal Sharma <67860577+gsharma-ad@users.noreply.github.com>2023-12-19 11:44:42 +0530
committerTomas Mraz <tomas@openssl.org>2023-12-22 14:15:14 +0100
commitf685ca3173956d201aa63e1522dc68a78098c12a (patch)
treef1c4018dc831feae238ae499764a295f164d372c /include
parenta26635e0d7f3228035ae1d0d110ea88479f84754 (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) (cherry picked from commit aa50768bf6d0a987028175c4a3cac8a142b15941)
Diffstat (limited to 'include')
-rw-r--r--include/internal/refcount.h4
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