diff options
| author | Ralf Jung <post@ralfj.de> | 2025-08-20 08:14:57 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-20 08:14:57 +0000 |
| commit | 46765526e33dca91b3860715097aa43efe2cf5da (patch) | |
| tree | c790c7a6d94c4d2c96b820cc93804ec55af4bdbe /library/std/src/sys/process/unix/common.rs | |
| parent | 49abb66e5d199497830b88397f2218cbe4b978f1 (diff) | |
| parent | 5556212823c359619302748e9280258c11799db1 (diff) | |
| download | rust-46765526e33dca91b3860715097aa43efe2cf5da.tar.gz rust-46765526e33dca91b3860715097aa43efe2cf5da.zip | |
Merge pull request #4532 from rust-lang/rustup-2025-08-20
Automatic Rustup
Diffstat (limited to 'library/std/src/sys/process/unix/common.rs')
| -rw-r--r-- | library/std/src/sys/process/unix/common.rs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/library/std/src/sys/process/unix/common.rs b/library/std/src/sys/process/unix/common.rs index 6219be60caf..ea45b08e90a 100644 --- a/library/std/src/sys/process/unix/common.rs +++ b/library/std/src/sys/process/unix/common.rs @@ -20,12 +20,14 @@ use crate::{fmt, io}; mod cstring_array; -cfg_if::cfg_if! { - if #[cfg(target_os = "fuchsia")] { +cfg_select! { + target_os = "fuchsia" => { // fuchsia doesn't have /dev/null - } else if #[cfg(target_os = "vxworks")] { + } + target_os = "vxworks" => { const DEV_NULL: &CStr = c"/null"; - } else { + } + _ => { const DEV_NULL: &CStr = c"/dev/null"; } } @@ -35,8 +37,8 @@ cfg_if::cfg_if! { // to support older Android version (independent of libc version). // The following implementations are based on // https://github.com/aosp-mirror/platform_bionic/blob/ad8dcd6023294b646e5a8288c0ed431b0845da49/libc/include/android/legacy_signal_inlines.h -cfg_if::cfg_if! { - if #[cfg(target_os = "android")] { +cfg_select! { + target_os = "android" => { #[allow(dead_code)] pub unsafe fn sigemptyset(set: *mut libc::sigset_t) -> libc::c_int { set.write_bytes(0u8, 1); @@ -69,7 +71,8 @@ cfg_if::cfg_if! { raw[bit / LONG_BIT] |= 1 << (bit % LONG_BIT); return 0; } - } else { + } + _ => { #[allow(unused_imports)] pub use libc::{sigemptyset, sigaddset}; } |
