Skip to content

Commit ed434f3

Browse files
committed
boot: bootutil: Fix clash of STRUCT_PACKED definition
Fixes an issue whereby another module might have declared this by undefining it if it's already set Signed-off-by: Jamie McCrae <[email protected]>
1 parent 33ad497 commit ed434f3

File tree

1 file changed

+6
-2
lines changed
  • boot/bootutil/include/bootutil

1 file changed

+6
-2
lines changed

Diff for: boot/bootutil/include/bootutil/image.h

+6-2
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,14 @@
3636
extern "C" {
3737
#endif
3838

39+
#if defined(STRUCT_PACKED)
40+
#undef STRUCT_PACKED
41+
#endif
42+
3943
#if defined(__IAR_SYSTEMS_ICC__)
40-
#define STRUCT_PACKED __packed struct
44+
#define STRUCT_PACKED __packed struct
4145
#else
42-
#define STRUCT_PACKED struct __attribute__((__packed__))
46+
#define STRUCT_PACKED struct __attribute__((__packed__))
4347
#endif
4448

4549
struct flash_area;

0 commit comments

Comments
 (0)