]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cgroup-util: avoid alignment warning when accessing f_handle 37520/head
authorJan Vaclav <jvaclav@redhat.com>
Tue, 20 May 2025 10:16:31 +0000 (12:16 +0200)
committerJan Vaclav <jvaclav@redhat.com>
Tue, 20 May 2025 10:16:31 +0000 (12:16 +0200)
src/basic/cgroup-util.h

index 1d67174b43c20233e7fd11841cfb7a3644af85e1..42c03e54b7199fce2fd001c3a7bbc2edebe2818b 100644 (file)
@@ -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))