Skip to content

Commit

Permalink
catfs: patch to compile using rust 1.65
Browse files Browse the repository at this point in the history
  • Loading branch information
tjni authored and jonringer committed Dec 17, 2022
1 parent d7ec1a3 commit 59aec36
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/os-specific/linux/catfs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down
13 changes: 13 additions & 0 deletions pkgs/os-specific/linux/catfs/fix-for-rust-1.65.diff
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 59aec36

Please sign in to comment.