mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-09-17 20:26:18 +00:00
id: fix support for OpenBSD
- add target_os cfg for pline function - add target_os cfg for auditd function (void on OpenBSD)
This commit is contained in:
parent
d239b2f47b
commit
94537d3b34
1 changed files with 4 additions and 4 deletions
|
@ -507,7 +507,7 @@ fn pline(possible_uid: Option<uid_t>) {
|
|||
);
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
#[cfg(any(target_os = "linux", target_os = "android", target_os = "openbsd"))]
|
||||
fn pline(possible_uid: Option<uid_t>) {
|
||||
let uid = possible_uid.unwrap_or_else(getuid);
|
||||
let pw = Passwd::locate(uid).unwrap();
|
||||
|
@ -524,10 +524,10 @@ fn pline(possible_uid: Option<uid_t>) {
|
|||
);
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
#[cfg(any(target_os = "linux", target_os = "android", target_os = "openbsd"))]
|
||||
fn auditid() {}
|
||||
|
||||
#[cfg(not(any(target_os = "linux", target_os = "android")))]
|
||||
#[cfg(not(any(target_os = "linux", target_os = "android", target_os = "openbsd")))]
|
||||
fn auditid() {
|
||||
use std::mem::MaybeUninit;
|
||||
|
||||
|
@ -624,7 +624,7 @@ fn id_print(state: &State, groups: &[u32]) {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "linux", target_os = "android")))]
|
||||
#[cfg(not(any(target_os = "linux", target_os = "android", target_os = "openbsd")))]
|
||||
mod audit {
|
||||
use super::libc::{c_int, c_uint, dev_t, pid_t, uid_t};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue