Skip to content

Commit 174ba76

Browse files
committed
fix(mkfifo): add feat_smack cfg alias
1 parent 995fe46 commit 174ba76

4 files changed

Lines changed: 17 additions & 1 deletion

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/uu/mkfifo/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ workspace = true
1818
[lib]
1919
path = "src/mkfifo.rs"
2020

21+
[build-dependencies]
22+
cfg_aliases.workspace = true
23+
2124
[dependencies]
2225
clap = { workspace = true }
2326
uucore = { workspace = true, features = ["fs", "mode"] }

src/uu/mkfifo/build.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// This file is part of the uutils coreutils package.
2+
//
3+
// For the full copyright and license information, please view the LICENSE
4+
// file that was distributed with this source code.
5+
6+
use cfg_aliases::cfg_aliases;
7+
8+
pub fn main() {
9+
cfg_aliases! {
10+
smack: { all(feature = "feat_smack", target_os = "linux") },
11+
}
12+
}

src/uu/mkfifo/src/mkfifo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
8383
}
8484

8585
// Apply SMACK context if requested
86-
#[cfg(feature = "smack")]
86+
#[cfg(smack)]
8787
{
8888
let set_security_context = matches.get_flag(options::SECURITY_CONTEXT);
8989
let context = matches.get_one::<String>(options::CONTEXT);

0 commit comments

Comments
 (0)