From d239b2f47b9a690905b60a51be5e4805e79af581 Mon Sep 17 00:00:00 2001 From: Laurent Cheylus Date: Sun, 3 Dec 2023 09:41:03 +0100 Subject: [PATCH] chroot: add OpenBSD support for set_groups function --- src/uu/chroot/src/chroot.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uu/chroot/src/chroot.rs b/src/uu/chroot/src/chroot.rs index 6366775c3..b0469ae04 100644 --- a/src/uu/chroot/src/chroot.rs +++ b/src/uu/chroot/src/chroot.rs @@ -253,7 +253,7 @@ fn set_main_group(group: &str) -> UResult<()> { 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 { unsafe { setgroups(groups.len() as libc::c_int, groups.as_ptr()) } }