From f514fabf61e122880c1c184fe57bccfe2388b57d Mon Sep 17 00:00:00 2001 From: George Marques Date: Sun, 23 Jul 2017 21:28:44 -0300 Subject: [PATCH] UWP: Fix build issue caused by atomic operations --- core/safe_refcount.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/safe_refcount.cpp b/core/safe_refcount.cpp index d18c90adfa..d7e5297321 100644 --- a/core/safe_refcount.cpp +++ b/core/safe_refcount.cpp @@ -185,7 +185,7 @@ static _ALWAYS_INLINE_ uint64_t _atomic_increment_impl(register uint64_t *pw) { static _ALWAYS_INLINE_ uint64_t _atomic_sub_impl(register uint64_t *pw, register uint64_t val) { -#if _WIN32_WINNT >= 0x0601 // Windows 7+ +#if _WIN32_WINNT >= 0x0601 && !defined(UWP_ENABLED) // Windows 7+ except UWP return InterlockedExchangeSubtract64(pw, val) - val; #else return InterlockedExchangeAdd64((LONGLONG volatile *)pw, -(int64_t)val) - val;