Skip to content

Commit c821cb8

Browse files
committed
uucore: add feat_selinux cfg alias
1 parent 392c474 commit c821cb8

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/uucore/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use cfg_aliases::cfg_aliases;
1414

1515
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
1616
cfg_aliases! {
17+
selinux: { all(feature = "feat_selinux", any(target_os = "android", target_os = "linux")) },
1718
systemd_logind: { all(feature = "feat_systemd_logind", target_os = "linux") },
1819
}
1920

src/uucore/src/lib/features.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub mod tty;
8181
pub mod fsxattr;
8282
#[cfg(feature = "hardware")]
8383
pub mod hardware;
84-
#[cfg(all(feature = "selinux", any(target_os = "linux", target_os = "android")))]
84+
#[cfg(selinux)]
8585
pub mod selinux;
8686
#[cfg(all(unix, not(target_os = "fuchsia"), feature = "signals"))]
8787
pub mod signals;

src/uucore/src/lib/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ pub use crate::features::fsext;
122122
#[cfg(all(unix, feature = "fsxattr"))]
123123
pub use crate::features::fsxattr;
124124

125-
#[cfg(all(feature = "selinux", any(target_os = "linux", target_os = "android")))]
125+
#[cfg(selinux)]
126126
pub use crate::features::selinux;
127127

128128
#[cfg(all(target_os = "linux", feature = "smack"))]

0 commit comments

Comments
 (0)