libsysprof-capture: Use offsetof() rather than G_STRUCT_OFFSET()

It does the same for modern compilers.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #40
This commit is contained in:
Philip Withnall
2020-07-02 11:00:14 +01:00
parent 284b5fd7cf
commit 3446628cec
2 changed files with 4 additions and 4 deletions

View File

@ -366,7 +366,7 @@ sysprof_capture_writer_cat (SysprofCaptureWriter *self,
frame->frame.pid,
frame->id,
frame->metadata,
frame->frame.len - G_STRUCT_OFFSET (SysprofCaptureMetadata, metadata));
frame->frame.len - offsetof (SysprofCaptureMetadata, metadata));
break;
}