mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-16 22:40:34 +08:00
use gcc attributes to align and pack
This commit is contained in:
committed by
Lorenz Meier
parent
76387b1693
commit
eb29b33620
@@ -46,6 +46,13 @@
|
||||
// Hack until everything is using this header
|
||||
#include <systemlib/visibility.h>
|
||||
|
||||
// Macro to define packed structures
|
||||
#ifdef __GNUC__
|
||||
#define ORBPACKED( __Declaration__ ) __Declaration__ __attribute__((aligned(4), packed))
|
||||
#else
|
||||
#define ORBPACKED( __Declaration__ ) __pragma( pack(push, 1) ) __Declaration__ __pragma( pack(pop) )
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Object metadata.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user