1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-17 20:26:18 +00:00

chroot: add OpenBSD support for set_groups function

This commit is contained in:
Laurent Cheylus 2023-12-03 09:41:03 +01:00
parent 181cfc885b
commit d239b2f47b

View file

@ -253,7 +253,7 @@ fn set_main_group(group: &str) -> UResult<()> {
Ok(()) Ok(())
} }
#[cfg(any(target_vendor = "apple", target_os = "freebsd"))] #[cfg(any(target_vendor = "apple", target_os = "freebsd", target_os = "openbsd"))]
fn set_groups(groups: &[libc::gid_t]) -> libc::c_int { fn set_groups(groups: &[libc::gid_t]) -> libc::c_int {
unsafe { setgroups(groups.len() as libc::c_int, groups.as_ptr()) } unsafe { setgroups(groups.len() as libc::c_int, groups.as_ptr()) }
} }