pidfd-util: avoid alignment warning when accessing f_handle

This commit is contained in:
Jan Vaclav
2025-05-20 12:07:43 +02:00
parent 58f36cfd29
commit b900a8d827
+1 -1
View File
@@ -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);