diff --git a/src/dashbls/depends/mimalloc/include/mimalloc-atomic.h b/src/dashbls/depends/mimalloc/include/mimalloc-atomic.h index 7ad5da5851336..879245ccb4503 100644 --- a/src/dashbls/depends/mimalloc/include/mimalloc-atomic.h +++ b/src/dashbls/depends/mimalloc/include/mimalloc-atomic.h @@ -39,7 +39,11 @@ terms of the MIT license. A copy of the license can be found in the file #include #define mi_atomic(name) atomic_##name #define mi_memory_order(name) memory_order_##name -#define MI_ATOMIC_VAR_INIT(x) ATOMIC_VAR_INIT(x) +#if !defined(ATOMIC_VAR_INIT) || (__STDC_VERSION__ >= 202311L) // C23, ATOMIC_VAR_INIT was removed + #define MI_ATOMIC_VAR_INIT(x) x +#else + #define MI_ATOMIC_VAR_INIT(x) ATOMIC_VAR_INIT(x) +#endif #endif // Various defines for all used memory orders in mimalloc