From 57b470bc51f5bfb5feefaaf28cced1ef75d15192 Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <barracuda@macos-powerpc.org>
Date: Fri, 21 Jun 2024 16:48:09 +0800
Subject: [PATCH] idris_signal: fix static_assert

---
 support/c/idris_signal.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git support/c/idris_signal.c support/c/idris_signal.c
index ed5ea227d..d5d91430b 100644
--- support/c/idris_signal.c
+++ support/c/idris_signal.c
@@ -12,6 +12,12 @@
 
 #include "idris_util.h"
 
+#if !defined(static_assert) && (defined(__GNUC__) || defined(__clang__)) \
+  && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \
+  && __STDC_VERSION__ <= 201710L
+#define static_assert _Static_assert
+#endif
+
 static_assert(ATOMIC_LONG_LOCK_FREE == 2,
               "when not lock free, atomic functions are not async-signal-safe");
 
