From 97f17c36bea9a89bcbaf245d112f712c44112977 Mon Sep 17 00:00:00 2001 From: Transporter Date: Tue, 17 Dec 2024 18:45:38 +0100 Subject: [PATCH] Fix invalid attribute for MSVC #3117 --- src/devices/deltadore_x3d.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/devices/deltadore_x3d.c b/src/devices/deltadore_x3d.c index 438fff9e2..dbe9b1dfb 100644 --- a/src/devices/deltadore_x3d.c +++ b/src/devices/deltadore_x3d.c @@ -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; @@ -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)