shred: make dependency on libc explicit

This commit is contained in:
Terts Diepraam 2023-03-12 13:49:18 +01:00
parent 9e0d3ea698
commit ae53b700d4
3 changed files with 5 additions and 1 deletions

1
Cargo.lock generated
View file

@ -3021,6 +3021,7 @@ name = "uu_shred"
version = "0.0.17"
dependencies = [
"clap",
"libc",
"rand",
"uucore",
]

View file

@ -18,6 +18,7 @@ path = "src/shred.rs"
clap = { workspace=true }
rand = { workspace=true }
uucore = { workspace=true }
libc = { workspace=true }
[[bin]]
name = "shred"

View file

@ -9,14 +9,16 @@
// spell-checker:ignore (words) wipesync prefill
use clap::{crate_version, Arg, ArgAction, Command};
#[cfg(unix)]
use libc::S_IWUSR;
use rand::{rngs::StdRng, seq::SliceRandom, Rng, SeedableRng};
use std::fs::{self, File, OpenOptions};
use std::io::{self, Seek, Write};
#[cfg(unix)]
use std::os::unix::prelude::PermissionsExt;
use std::path::{Path, PathBuf};
use uucore::display::Quotable;
use uucore::error::{FromIo, UResult, USimpleError, UUsageError};
use uucore::libc::S_IWUSR;
use uucore::{format_usage, help_about, help_section, help_usage, show, show_error, show_if_err};
const ABOUT: &str = help_about!("shred.md");