1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-16 18:13:49 +01:00
RIOT/pkg/esp32_sdk/patches/0024-esp_common-use-_Static_assert-instead-of-static_asse.patch
2025-05-27 23:25:36 +02:00

29 lines
962 B
Diff

From b2454c0629b03bb244ea9781f294c4a96b7fd848 Mon Sep 17 00:00:00 2001
From: Gunar Schorcht <gunar@schorcht.net>
Date: Sun, 2 Mar 2025 10:40:35 +0100
Subject: [PATCH 24/28] esp_common: use _Static_assert instead of static_assert
---
components/esp_common/include/esp_assert.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/components/esp_common/include/esp_assert.h b/components/esp_common/include/esp_assert.h
index fa54fdbedb..e6a77ae046 100644
--- a/components/esp_common/include/esp_assert.h
+++ b/components/esp_common/include/esp_assert.h
@@ -10,7 +10,11 @@
/* Since IDF v5.0, C17 standard is used, which supports both _Static_assert and static_assert syntax */
/* Please do not use `_Static_assert` for C++ compatibility */
+#ifndef RIOT_VERSION
#define ESP_STATIC_ASSERT static_assert
+#else
+#define ESP_STATIC_ASSERT _Static_assert
+#endif
/* Assert at compile time if possible, runtime otherwise */
#ifndef __cplusplus
--
2.34.1