Skip to content

Commit 0cc71d5

Browse files
author
hexiao
committed
[arm_compiler_v4/v5] define rt_packed as __packed
1 parent d23006e commit 0cc71d5

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

components/drivers/block/partitions/efi.h

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

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

3939
#ifndef __EFI_H__
40-
typedef guid_t efi_guid_t rt_align(4);
40+
typedef rt_packed(guid_t) efi_guid_t rt_align(4);
4141

4242
#define EFI_GUID(a, b, c, d...) (efi_guid_t) \
4343
{{ \

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)