From: Jan Vaclav Date: Tue, 20 May 2025 10:07:43 +0000 (+0200) Subject: pidfd-util: avoid alignment warning when accessing f_handle X-Git-Tag: v258-rc1~566^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b900a8d827e54c9274410d61fe2fc9874d5b7baa;p=thirdparty%2Fsystemd.git pidfd-util: avoid alignment warning when accessing f_handle --- diff --git a/src/basic/pidfd-util.c b/src/basic/pidfd-util.c index 52a371ba1ac..54724a40b06 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);