Преглед на файлове

aot_reloc_xtensa.c: define __packed if not available (#1179)

YAMAMOTO Takashi преди 3 години
родител
ревизия
69c23aa2d4
променени са 1 файла, в които са добавени 10 реда и са изтрити 0 реда
  1. 10 0
      core/iwasm/aot/arch/aot_reloc_xtensa.c

+ 10 - 0
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;