From: Jan Vaclav Date: Tue, 20 May 2025 10:16:31 +0000 (+0200) Subject: cgroup-util: avoid alignment warning when accessing f_handle X-Git-Tag: v258-rc1~566^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F37520%2Fhead;p=thirdparty%2Fsystemd.git cgroup-util: avoid alignment warning when accessing f_handle --- diff --git a/src/basic/cgroup-util.h b/src/basic/cgroup-util.h index 1d67174b43c..42c03e54b71 100644 --- a/src/basic/cgroup-util.h +++ b/src/basic/cgroup-util.h @@ -332,4 +332,4 @@ typedef union { .file_handle.handle_type = FILEID_KERNFS, \ } -#define CG_FILE_HANDLE_CGROUPID(fh) (*(uint64_t*) (fh).file_handle.f_handle) +#define CG_FILE_HANDLE_CGROUPID(fh) (*CAST_ALIGN_PTR(uint64_t, (fh).file_handle.f_handle))