Commit 1b8d7fb3 authored by Rajavardhan Gundi's avatar Rajavardhan Gundi Committed by Fabio Utzig
Browse files

Use BUILD_ASSERT_MSG instead of _Static_assert in Zephyr

parent e5aeee4a
Loading
Loading
Loading
Loading
+9
Changes for boot/bootutil/include/bootutil/image.h: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -22,6 +22,10 @@

#include <inttypes.h>

#ifdef __ZEPHYR__
#include <toolchain/gcc.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif
@@ -105,8 +109,13 @@ struct image_tlv {

#define IS_ENCRYPTED(hdr) ((hdr)->ih_flags & IMAGE_F_ENCRYPTED)

#ifdef __ZEPHYR__
BUILD_ASSERT_MSG(sizeof(struct image_header) == IMAGE_HEADER_SIZE,
               "struct image_header not required size");
#else
_Static_assert(sizeof(struct image_header) == IMAGE_HEADER_SIZE,
               "struct image_header not required size");
#endif

int bootutil_img_validate(struct image_header *hdr,
                          const struct flash_area *fap,