Skip to content

Commit

Permalink
Fix invalid attribute for MSVC #3117
Browse files Browse the repository at this point in the history
  • Loading branch information
OgreTransporter committed Dec 17, 2024
1 parent 11d2c7a commit 97f17c3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/devices/deltadore_x3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,12 @@ struct deltadore_x3d_message_header {
int16_t header_check;
};

#ifdef _MSC_VER
#pragma pack(push, 1)
struct deltadore_x3d_message_payload {
#else
struct __attribute__((packed)) deltadore_x3d_message_payload {
#endif
uint8_t retry;
uint16_t transfer;
uint16_t transfer_ack;
Expand All @@ -184,6 +189,9 @@ struct __attribute__((packed)) deltadore_x3d_message_payload {
uint8_t register_low;
uint16_t target_ack;
};
#ifdef _MSC_VER
#pragma pack(pop)
#endif

/* clang-format off */
static uint32_t deltadore_x3d_read_le_u24(uint8_t **buffer)
Expand Down

0 comments on commit 97f17c3

Please sign in to comment.