From 985de0e1c5b292f538d7ba2628a1194acf276a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Fri, 12 Jul 2024 13:41:16 +0200 Subject: [PATCH] fix: make `FUSE_ROOT_ID` an `u64` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- bindgen.sh | 2 +- ...y-support-for-__IncompleteArrayField.patch | 0 .../0002-fix-make-FUSE_ROOT_ID-an-u64.patch | 24 +++++++++++++++++++ src/linux.rs | 2 +- src/macos.rs | 2 +- 5 files changed, 27 insertions(+), 3 deletions(-) rename 0001-fix-add-zerocopy-support-for-__IncompleteArrayField.patch => patches/0001-fix-add-zerocopy-support-for-__IncompleteArrayField.patch (100%) create mode 100644 patches/0002-fix-make-FUSE_ROOT_ID-an-u64.patch diff --git a/bindgen.sh b/bindgen.sh index 3bb443a..55f009e 100755 --- a/bindgen.sh +++ b/bindgen.sh @@ -18,4 +18,4 @@ gen() { gen include/linux.h -o src/linux.rs gen include/macos.h -o src/macos.rs -- -D __APPLE__ -git apply 0001-fix-add-zerocopy-support-for-__IncompleteArrayField.patch +git apply patches/* diff --git a/0001-fix-add-zerocopy-support-for-__IncompleteArrayField.patch b/patches/0001-fix-add-zerocopy-support-for-__IncompleteArrayField.patch similarity index 100% rename from 0001-fix-add-zerocopy-support-for-__IncompleteArrayField.patch rename to patches/0001-fix-add-zerocopy-support-for-__IncompleteArrayField.patch diff --git a/patches/0002-fix-make-FUSE_ROOT_ID-an-u64.patch b/patches/0002-fix-make-FUSE_ROOT_ID-an-u64.patch new file mode 100644 index 0000000..1d42166 --- /dev/null +++ b/patches/0002-fix-make-FUSE_ROOT_ID-an-u64.patch @@ -0,0 +1,24 @@ +diff --git a/src/linux.rs b/src/linux.rs +--- a/src/linux.rs ++++ b/src/linux.rs +@@ -40,7 +40,7 @@ impl ::core::fmt::Debug for __IncompleteArrayField { + } + pub const FUSE_KERNEL_VERSION: u32 = 7; + pub const FUSE_KERNEL_MINOR_VERSION: u32 = 40; +-pub const FUSE_ROOT_ID: u32 = 1; ++pub const FUSE_ROOT_ID: u64 = 1; + pub const FATTR_MODE: u32 = 1; + pub const FATTR_UID: u32 = 2; + pub const FATTR_GID: u32 = 4; +diff --git a/src/macos.rs b/src/macos.rs +--- a/src/macos.rs ++++ b/src/macos.rs +@@ -40,7 +40,7 @@ impl ::core::fmt::Debug for __IncompleteArrayField { + } + pub const FUSE_KERNEL_VERSION: u32 = 7; + pub const FUSE_KERNEL_MINOR_VERSION: u32 = 19; +-pub const FUSE_ROOT_ID: u32 = 1; ++pub const FUSE_ROOT_ID: u64 = 1; + pub const FATTR_MODE: u32 = 1; + pub const FATTR_UID: u32 = 2; + pub const FATTR_GID: u32 = 4; diff --git a/src/linux.rs b/src/linux.rs index 709ee7c..ac99dae 100644 --- a/src/linux.rs +++ b/src/linux.rs @@ -40,7 +40,7 @@ impl ::core::fmt::Debug for __IncompleteArrayField { } pub const FUSE_KERNEL_VERSION: u32 = 7; pub const FUSE_KERNEL_MINOR_VERSION: u32 = 40; -pub const FUSE_ROOT_ID: u32 = 1; +pub const FUSE_ROOT_ID: u64 = 1; pub const FATTR_MODE: u32 = 1; pub const FATTR_UID: u32 = 2; pub const FATTR_GID: u32 = 4; diff --git a/src/macos.rs b/src/macos.rs index 261293d..2c260c1 100644 --- a/src/macos.rs +++ b/src/macos.rs @@ -40,7 +40,7 @@ impl ::core::fmt::Debug for __IncompleteArrayField { } pub const FUSE_KERNEL_VERSION: u32 = 7; pub const FUSE_KERNEL_MINOR_VERSION: u32 = 19; -pub const FUSE_ROOT_ID: u32 = 1; +pub const FUSE_ROOT_ID: u64 = 1; pub const FATTR_MODE: u32 = 1; pub const FATTR_UID: u32 = 2; pub const FATTR_GID: u32 = 4;