diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h index a77b690709cc..7f0b91dfb532 100644 --- a/include/trace/trace_events.h +++ b/include/trace/trace_events.h @@ -479,7 +479,7 @@ static struct trace_event_functions trace_event_type_funcs_##call = { \ #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) -#define ALIGN_STRUCTFIELD(type) ((int)(offsetof(struct {char a; type b;}, b))) +#define ALIGN_STRUCTFIELD(type) ((int)(__alignof__(struct {type b;}))) #undef __field_ext #define __field_ext(_type, _item, _filter_type) { \