From 4d2e61211df7244fae6aaeb8cae0916b4a0e78bd Mon Sep 17 00:00:00 2001 From: Jan Vaclav Date: Tue, 20 May 2025 12:16:31 +0200 Subject: [PATCH] cgroup-util: avoid alignment warning when accessing f_handle --- src/basic/cgroup-util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- 2.47.3