diff options
author | Stanislaw Halik <sthalik@tehran.lain.pl> | 2019-12-31 01:24:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-31 01:24:16 +0100 |
commit | c11a2ebb93da1eb59fdfbb02c06d5970ca32841d (patch) | |
tree | 1e3a41ce8a717ab925901599bc196f63294a35c5 | |
parent | f5dd3ec866d095af005594504b9adfe430d7fc49 (diff) | |
parent | 678ba1e120b033ee877f70c24913ff049a7f731f (diff) |
Merge pull request #1018 from rvt/freepie-packed-struct
FreePIE Use packed struct with clang to receive datagram
-rw-r--r-- | tracker-freepie-udp/ftnoir_tracker_freepie-udp.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tracker-freepie-udp/ftnoir_tracker_freepie-udp.cpp b/tracker-freepie-udp/ftnoir_tracker_freepie-udp.cpp index 6622a3b7..28d29351 100644 --- a/tracker-freepie-udp/ftnoir_tracker_freepie-udp.cpp +++ b/tracker-freepie-udp/ftnoir_tracker_freepie-udp.cpp @@ -17,13 +17,21 @@ tracker_freepie::~tracker_freepie() } void tracker_freepie::run() { -#pragma pack(push, 1) - struct { +#ifndef __clang__ +#pragma pack(push) +struct +#else +struct __attribute__((packed)) +#endif +{ uint8_t pad1; uint8_t flags; float fl[12]; - } data {}; +} data; +#ifndef __clang__ #pragma pack(pop) +#endif + enum F { |