From b6570abe79f4ba9ec2020aa899c27eedd08cb294 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Mon, 30 Nov 2020 09:53:59 +0100 Subject: [PATCH] changes for proxmox 0.8 Signed-off-by: Wolfgang Bumiller --- src/tools/logrotate.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/logrotate.rs b/src/tools/logrotate.rs index c3195e2c..354e9c6a 100644 --- a/src/tools/logrotate.rs +++ b/src/tools/logrotate.rs @@ -1,6 +1,6 @@ use std::path::{Path, PathBuf}; use std::fs::{File, rename}; -use std::os::unix::io::FromRawFd; +use std::os::unix::io::{FromRawFd, IntoRawFd}; use std::io::Read; use anyhow::{bail, Error}; @@ -49,7 +49,7 @@ impl LogRotate { fn compress(source_path: &PathBuf, target_path: &PathBuf, options: &CreateOptions) -> Result<(), Error> { let mut source = File::open(source_path)?; let (fd, tmp_path) = make_tmp_file(target_path, options.clone())?; - let target = unsafe { File::from_raw_fd(fd) }; + let target = unsafe { File::from_raw_fd(fd.into_raw_fd()) }; let mut encoder = match zstd::stream::write::Encoder::new(target, 0) { Ok(encoder) => encoder, Err(err) => {