File dash-core-mimalloc-c17.patch of Package dash-core

From 705c0afc1a42af57a8bf4c00be3870c65ed698de 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.49.0