From 69c23aa2d445350f26c817a93583017e1c4855a6 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Sat, 21 May 2022 17:46:02 +0900 Subject: [PATCH] aot_reloc_xtensa.c: define __packed if not available (#1179) --- core/iwasm/aot/arch/aot_reloc_xtensa.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/iwasm/aot/arch/aot_reloc_xtensa.c b/core/iwasm/aot/arch/aot_reloc_xtensa.c index 5e1a34c4e..d6747f629 100644 --- a/core/iwasm/aot/arch/aot_reloc_xtensa.c +++ b/core/iwasm/aot/arch/aot_reloc_xtensa.c @@ -130,6 +130,16 @@ static union { #define is_little_endian() (__ue.b == 1) +#if !defined(__packed) +/* + * Note: This version check is a bit relaxed. + * The __packed__ attribute has been there since gcc 2 era. + */ +#if __GNUC__ >= 3 +#define __packed __attribute__((__packed__)) +#endif +#endif + typedef union { struct l32r_le { int8 other;