summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shared/c-rbtree/src/c-rbtree.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/shared/c-rbtree/src/c-rbtree.h b/shared/c-rbtree/src/c-rbtree.h
index a9bbce52f2..d1941185fb 100644
--- a/shared/c-rbtree/src/c-rbtree.h
+++ b/shared/c-rbtree/src/c-rbtree.h
@@ -27,6 +27,7 @@ extern "C" {
#endif
#include <assert.h>
+#include <stdalign.h>
#include <stddef.h>
typedef struct CRBNode CRBNode;
@@ -58,7 +59,10 @@ typedef struct CRBTree CRBTree;
* C_RBNODE_INIT.
*/
struct CRBNode {
- unsigned long __parent_and_flags;
+ union {
+ unsigned long __parent_and_flags;
+ alignas(4) char __dmmy_for_struct_alignment;
+ };
CRBNode *left;
CRBNode *right;
};