From b900a8d827e54c9274410d61fe2fc9874d5b7baa Mon Sep 17 00:00:00 2001 From: Jan Vaclav Date: Tue, 20 May 2025 12:07:43 +0200 Subject: [PATCH] pidfd-util: avoid alignment warning when accessing f_handle --- src/basic/pidfd-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/pidfd-util.c b/src/basic/pidfd-util.c index 52a371ba1a..54724a40b0 100644 --- a/src/basic/pidfd-util.c +++ b/src/basic/pidfd-util.c @@ -248,7 +248,7 @@ int pidfd_get_inode_id(int fd, uint64_t *ret) { r = RET_NERRNO(name_to_handle_at(fd, "", &fh.file_handle, &mnt_id, AT_EMPTY_PATH)); if (r >= 0) { if (ret) - *ret = *(uint64_t*) fh.file_handle.f_handle; + *ret = *CAST_ALIGN_PTR(uint64_t, fh.file_handle.f_handle); return 0; } assert(r != -EOVERFLOW);