[U-Boot] [PATCH v3 5/9] tools: ifwitool: Define __packed when it is not defined

Bin Meng bmeng.cn at gmail.com
Sun Oct 27 12:19:44 UTC 2019


Some compilers may provide __packed define for us.

Signed-off-by: Bin Meng <bmeng.cn at gmail.com>

---

Changes in v3:
- new patch: tools: ifwitool: Define __packed when it is not defined

Changes in v2: None

 tools/ifwitool.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/ifwitool.c b/tools/ifwitool.c
index 2e020a8..543e9d4 100644
--- a/tools/ifwitool.c
+++ b/tools/ifwitool.c
@@ -10,7 +10,9 @@
 #include <getopt.h>
 #include "os_support.h"
 
+#ifndef __packed
 #define __packed		__attribute__((packed))
+#endif
 #define KiB			1024
 #define ALIGN(x, a)		__ALIGN_MASK((x), (typeof(x))(a) - 1)
 #define __ALIGN_MASK(x, mask)	(((x) + (mask)) & ~(mask))
-- 
2.7.4



More information about the U-Boot mailing list