File dash-core-mimalloc-c17.patch of Package dash-core
From 09a35150e1587b3f09ee8b1aabe788e22cb4167c Mon Sep 17 00:00:00 2001 From: Oleg Girko <ol@infoserver.lv> Date: Sat, 29 Mar 2025 20:21:20 +0000 Subject: [PATCH] Don't use deprecated ATOMIC_VAR_INIT macro in C17. This macro was deprecated and not available starting with C17. Signed-off-by: Oleg Girko <ol@infoserver.lv> --- src/dashbls/depends/mimalloc/include/mimalloc-atomic.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dashbls/depends/mimalloc/include/mimalloc-atomic.h b/src/dashbls/depends/mimalloc/include/mimalloc-atomic.h index 7ad5da5851..ff39c1d397 100644 --- a/src/dashbls/depends/mimalloc/include/mimalloc-atomic.h +++ b/src/dashbls/depends/mimalloc/include/mimalloc-atomic.h @@ -39,8 +39,13 @@ terms of the MIT license. A copy of the license can be found in the file #include <stdatomic.h> #define mi_atomic(name) atomic_##name #define mi_memory_order(name) memory_order_##name +#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L +// ATOMIC_VAR_INIT deprecated +#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 #define mi_atomic_cas_weak(p,expected,desired,mem_success,mem_fail) \ -- 2.52.0