1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 12:07:46 +00:00

Merge pull request #2375 from youknowone/fix-2371

Fix build when not(feature = "process")
This commit is contained in:
Terts Diepraam 2021-06-09 21:15:04 +02:00 committed by GitHub
commit 5856861ed6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -15,7 +15,7 @@ edition = "2018"
path = "src/groups.rs"
[dependencies]
uucore = { version=">=0.0.8", package="uucore", path="../../uucore", features=["entries"] }
uucore = { version=">=0.0.8", package="uucore", path="../../uucore", features=["entries", "process"] }
uucore_procs = { version=">=0.0.5", package="uucore_procs", path="../../uucore_procs" }
clap = "2.33"

View file

@ -94,6 +94,7 @@ pub fn get_groups() -> IOResult<Vec<gid_t>> {
/// groups is the same (in the mathematical sense of ``set''). (The
/// history of a process and its parents could affect the details of
/// the result.)
#[cfg(all(unix, feature = "process"))]
pub fn get_groups_gnu(arg_id: Option<u32>) -> IOResult<Vec<gid_t>> {
let mut groups = get_groups()?;
let egid = arg_id.unwrap_or_else(crate::features::process::getegid);