From 08874b70aa96f6bcdcd01e79d607605a6f2c2677 Mon Sep 17 00:00:00 2001 From: jhmaster <32803471+jhmaster2000@users.noreply.github.com> Date: Mon, 10 Apr 2023 08:05:33 -0300 Subject: [PATCH] Fix compilation on Android --- include/mimalloc/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mimalloc/atomic.h b/include/mimalloc/atomic.h index fe79fbca..6fb4951c 100644 --- a/include/mimalloc/atomic.h +++ b/include/mimalloc/atomic.h @@ -281,7 +281,7 @@ typedef _Atomic(uintptr_t) mi_atomic_once_t; static inline bool mi_atomic_once( mi_atomic_once_t* once ) { if (mi_atomic_load_relaxed(once) != 0) return false; // quick test uintptr_t expected = 0; - return mi_atomic_cas_strong_acq_rel(once, &expected, 1); // try to set to 1 + return mi_atomic_cas_strong_acq_rel(once, &expected, 1UL); // try to set to 1 } // Yield