Skip to content

Commit 24345a7

Browse files
committed
refactor: correct wrong cfg value && remove ones that do not exist
1 parent 590ab4d commit 24345a7

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

build.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,15 @@ fn main() {
2626
netbsdlike: { any(netbsd, openbsd) },
2727
solarish: { any(illumos, solaris) },
2828
}
29+
30+
// Below are Nix's custom cfg values that we need to let the compiler know
31+
println!("cargo:rustc-check-cfg=cfg(apple_targets)");
32+
println!("cargo:rustc-check-cfg=cfg(bsd)");
33+
println!("cargo:rustc-check-cfg=cfg(bsd_without_apple)");
34+
println!("cargo:rustc-check-cfg=cfg(linux_android)");
35+
println!("cargo:rustc-check-cfg=cfg(freebsdlike)");
36+
println!("cargo:rustc-check-cfg=cfg(netbsdlike)");
37+
println!("cargo:rustc-check-cfg=cfg(solarish)");
38+
println!("cargo:rustc-check-cfg=cfg(fbsd14)");
39+
println!("cargo:rustc-check-cfg=cfg(qemu)");
2940
}

src/sys/signal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ impl SigSet {
597597
target_os = "haiku",
598598
target_os = "hurd",
599599
target_os = "aix",
600-
target_os = "fushsia"
600+
target_os = "fuchsia"
601601
))]
602602
#[doc(alias("sigsuspend"))]
603603
pub fn suspend(&self) -> Result<()> {

test/sys/test_signal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ fn test_sigwait() {
350350
target_os = "haiku",
351351
target_os = "hurd",
352352
target_os = "aix",
353-
target_os = "fushsia"
353+
target_os = "fuchsia"
354354
))]
355355
#[test]
356356
fn test_sigsuspend() {

test/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ mod test_fcntl;
1515
mod test_kmod;
1616
#[cfg(any(
1717
freebsdlike,
18-
target_os = "fushsia",
18+
target_os = "fuchsia",
1919
target_os = "linux",
2020
target_os = "netbsd"
2121
))]

test/test_fcntl.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use nix::fcntl::{openat2, OpenHow, ResolveFlag};
1313
target_env = "gnu",
1414
any(
1515
target_arch = "x86_64",
16-
target_arch = "x32",
1716
target_arch = "powerpc",
1817
target_arch = "s390x"
1918
)
@@ -146,7 +145,6 @@ fn test_renameat() {
146145
target_env = "gnu",
147146
any(
148147
target_arch = "x86_64",
149-
target_arch = "x32",
150148
target_arch = "powerpc",
151149
target_arch = "s390x"
152150
)
@@ -190,7 +188,6 @@ fn test_renameat2_behaves_like_renameat_with_no_flags() {
190188
target_env = "gnu",
191189
any(
192190
target_arch = "x86_64",
193-
target_arch = "x32",
194191
target_arch = "powerpc",
195192
target_arch = "s390x"
196193
)
@@ -238,7 +235,6 @@ fn test_renameat2_exchange() {
238235
target_env = "gnu",
239236
any(
240237
target_arch = "x86_64",
241-
target_arch = "x32",
242238
target_arch = "powerpc",
243239
target_arch = "s390x"
244240
)

0 commit comments

Comments
 (0)