Skip to content

Commit de11757

Browse files
committed
Ensure capn segment is aligned properly when build with gcc too. Fixes build on 32 bits arm.
1 parent c628547 commit de11757

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/capnp_c.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ struct capn_segment {
115115
char *data;
116116
size_t len, cap;
117117
void *user;
118-
};
118+
}
119+
#ifdef __GNUC__
120+
__attribute__((aligned(8)))
121+
#endif
122+
;
119123

120124
enum CAPN_TYPE {
121125
CAPN_NULL = 0,

0 commit comments

Comments
 (0)