diff options
Diffstat (limited to 'include/internal/refcount.h')
-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 |