Skip to content

[arm_compiler_v4/v5] define rt_packed as __packed #10553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions components/drivers/block/partitions/efi.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@
#ifndef __UUID_H__
#define UUID_SIZE 16

typedef struct
rt_packed(struct _guid_t
{
rt_uint8_t b[UUID_SIZE];
} guid_t;
});
typedef struct _guid_t guid_t;
#endif /* __UUID_H__ */

#ifndef __EFI_H__
Expand Down
4 changes: 2 additions & 2 deletions components/drivers/include/drivers/nvme.h
Original file line number Diff line number Diff line change
Expand Up @@ -717,12 +717,12 @@ enum
RT_NVME_CTRL_CTRATT_UUID_LIST = 1 << 9,
};

struct rt_nvme_lba_format
rt_packed(struct rt_nvme_lba_format
{
rt_le16_t ms; /* Metadata size */
rt_uint8_t ds; /* Data size */
rt_uint8_t rp; /* Relative performance */
};
});

rt_packed(struct rt_nvme_id_ns
{
Expand Down
2 changes: 1 addition & 1 deletion include/rtcompiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#if __ARMCC_VERSION >= 6010050
#define rt_packed(declare) declare __attribute__((packed))
#else
#define rt_packed(declare) declare
#define rt_packed(declare) __packed declare
#endif
#define rt_weak __attribute__((weak))
#define rt_typeof __typeof
Expand Down