Skip to content

Commit 37d9025

Browse files
authored
[arm_compiler_v4/v5] define rt_packed as __packed #10553
1 parent 83909b2 commit 37d9025

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

components/drivers/block/partitions/efi.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@
3030
#ifndef __UUID_H__
3131
#define UUID_SIZE 16
3232

33-
typedef struct
33+
rt_packed(struct _guid_t
3434
{
3535
rt_uint8_t b[UUID_SIZE];
36-
} guid_t;
36+
});
37+
typedef struct _guid_t guid_t;
3738
#endif /* __UUID_H__ */
3839

3940
#ifndef __EFI_H__

components/drivers/include/drivers/nvme.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,12 +717,12 @@ enum
717717
RT_NVME_CTRL_CTRATT_UUID_LIST = 1 << 9,
718718
};
719719

720-
struct rt_nvme_lba_format
720+
rt_packed(struct rt_nvme_lba_format
721721
{
722722
rt_le16_t ms; /* Metadata size */
723723
rt_uint8_t ds; /* Data size */
724724
rt_uint8_t rp; /* Relative performance */
725-
};
725+
});
726726

727727
rt_packed(struct rt_nvme_id_ns
728728
{

include/rtcompiler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#if __ARMCC_VERSION >= 6010050
2020
#define rt_packed(declare) declare __attribute__((packed))
2121
#else
22-
#define rt_packed(declare) declare
22+
#define rt_packed(declare) __packed declare
2323
#endif
2424
#define rt_weak __attribute__((weak))
2525
#define rt_typeof __typeof

0 commit comments

Comments
 (0)