mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
From effe2aba65640d2906991341b0a080b568c8e77a Mon Sep 17 00:00:00 2001
|
|
From: Gunar Schorcht <gunar@schorcht.net>
|
|
Date: Sun, 30 Jan 2022 08:17:13 +0100
|
|
Subject: [PATCH 07/12] compilation: avoid multiple definitions of macros
|
|
|
|
---
|
|
components/wpa_supplicant/src/utils/common.h | 3 +++
|
|
components/xtensa/include/xtensa/xtruntime-frames.h | 7 +++++++
|
|
2 files changed, 10 insertions(+)
|
|
|
|
diff --git a/components/wpa_supplicant/src/utils/common.h b/components/wpa_supplicant/src/utils/common.h
|
|
index 0596b6ab4f..f6dd346e44 100644
|
|
--- a/components/wpa_supplicant/src/utils/common.h
|
|
+++ b/components/wpa_supplicant/src/utils/common.h
|
|
@@ -440,7 +440,10 @@ struct wpa_freq_range_list {
|
|
unsigned int num;
|
|
};
|
|
|
|
+#ifndef ARRAY_SIZE
|
|
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
|
+#endif
|
|
+
|
|
#ifndef TEST_FAIL
|
|
#define TEST_FAIL() 0
|
|
#endif
|
|
diff --git a/components/xtensa/include/xtensa/xtruntime-frames.h b/components/xtensa/include/xtensa/xtruntime-frames.h
|
|
index d0eb368735..de5aab9e41 100644
|
|
--- a/components/xtensa/include/xtensa/xtruntime-frames.h
|
|
+++ b/components/xtensa/include/xtensa/xtruntime-frames.h
|
|
@@ -29,6 +29,13 @@
|
|
|
|
#include <xtensa/config/core.h>
|
|
|
|
+#ifdef STRUCT_BEGIN
|
|
+#undef STRUCT_BEGIN
|
|
+#undef STRUCT_FIELD
|
|
+#undef STRUCT_AFIELD
|
|
+#undef STRUCT_END
|
|
+#endif
|
|
+
|
|
/* Macros that help define structures for both C and assembler: */
|
|
#if defined(_ASMLANGUAGE) || defined(__ASSEMBLER__)
|
|
#define STRUCT_BEGIN .pushsection .text; .struct 0
|
|
--
|
|
2.17.1
|
|
|