fix: use libc::c_int for file descriptor instead of nix::Fd
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user