1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-03 09:42:22 +02:00

tools: ifwitool: Define __packed when it is not defined

Some compilers may provide __packed define for us.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Bin Meng
2019-10-27 05:19:44 -07:00
committed by Tom Rini
parent 10289b4ed9
commit ccd4398fa7

View File

@@ -10,7 +10,9 @@
#include <getopt.h> #include <getopt.h>
#include "os_support.h" #include "os_support.h"
#ifndef __packed
#define __packed __attribute__((packed)) #define __packed __attribute__((packed))
#endif
#define KiB 1024 #define KiB 1024
#define ALIGN(x, a) __ALIGN_MASK((x), (typeof(x))(a) - 1) #define ALIGN(x, a) __ALIGN_MASK((x), (typeof(x))(a) - 1)
#define __ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask)) #define __ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask))