]> git.proxmox.com Git - proxmox-fuse.git/commitdiff
fix alignment of bit field in fuse file info
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 14 Feb 2024 11:40:00 +0000 (12:40 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 14 Feb 2024 11:40:49 +0000 (12:40 +0100)
the C code uses 2 unsigned ints

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/sys.rs

index 06c596dc3f1158c1b85da64592da9ef5947fd448..8e1464d23ab00f02f89021cc42875359826ecc54 100644 (file)
@@ -4,7 +4,7 @@ use std::ffi::CStr;
 use std::io;
 use std::marker::PhantomData;
 
-use libc::{c_char, c_int, c_void, off_t, size_t};
+use libc::{c_char, c_int, c_uint, c_void, off_t, size_t};
 
 /// Node ID of the root i-node. This is fixed according to the FUSE API.
 pub const ROOT_ID: u64 = 1;
@@ -234,7 +234,8 @@ pub struct FuseFileInfo {
     pub(crate) flags: c_int,
 
     /// Various bitfields for which we have C glue code in `glue.c`.
-    _bits: u64,
+    _bits: c_uint,
+    _bits2: c_uint,
 
     /// File handle.  May be filled in by filesystem in open().
     /// Available in all other file operations