diff --git a/src/modes/diff.rs b/src/modes/diff.rs index d9307fa..3773bc0 100644 --- a/src/modes/diff.rs +++ b/src/modes/diff.rs @@ -1,6 +1,7 @@ use crate::compression::CompressionType; use std::path::PathBuf; use std::str::FromStr; +use libc::c_int; use anyhow::{anyhow, Result}; use clap::Command; @@ -145,11 +146,9 @@ pub fn mode_diff( fn spawn_writer_thread( item_path: PathBuf, compression_type: CompressionType, - fd_write: nix::unistd::Fd, + fd_write: c_int, ) -> std::thread::JoinHandle<()> { - // Convert nix::unistd::Fd to raw fd - let raw_fd = fd_write.0; - let pipe_writer_raw = unsafe { std::fs::File::from_raw_fd(raw_fd) }; + let pipe_writer_raw = unsafe { std::fs::File::from_raw_fd(fd_write) }; std::thread::spawn(move || { write_item_to_pipe( item_path,