catfs: patch to compile using rust 1.65

This commit is contained in:
Theodore Ni 2022-12-09 14:16:20 -08:00 committed by Jonathan Ringer
parent d7ec1a3251
commit 59aec3697e
2 changed files with 18 additions and 0 deletions

View file

@ -15,6 +15,11 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-OvmtU2jpewP5EqPwEFAf67t8UCI1WuzUO2QQj4cH1Ak=";
};
patches = [
# monitor https://github.com/kahing/catfs/issues/71
./fix-for-rust-1.65.diff
];
cargoHash = "sha256-xF1J2Pr4qtNFcd2kec4tnbdYxoLK+jRnzp8p+cmNOcI=";
nativeBuildInputs = [ pkg-config ];

View file

@ -0,0 +1,13 @@
diff --git a/src/catfs/file.rs b/src/catfs/file.rs
index 6e781eb..92fdd80 100644
--- a/src/catfs/file.rs
+++ b/src/catfs/file.rs
@@ -569,7 +569,7 @@ impl Handle {
path: &dyn AsRef<Path>,
create: bool,
) -> error::Result<()> {
- let _ = self.page_in_res.0.lock().unwrap();
+ drop(self.page_in_res.0.lock().unwrap());
let mut buf = [0u8; 0];
let mut flags = rlibc::O_RDWR;