diff options
| author | Mads Marquart <mads@marquart.dk> | 2024-04-28 18:22:37 +0200 |
|---|---|---|
| committer | Mads Marquart <mads@marquart.dk> | 2024-04-28 18:22:37 +0200 |
| commit | d9c0eb8084deb65de69b23a7714b66efbff7eb03 (patch) | |
| tree | aac29bbed1315261cad4d77a0025225c1ee658f4 /library/std/src/sys/pal/unix/mod.rs | |
| parent | cb4940645775f60d74aee2e018d6c516c5aa9ed7 (diff) | |
| download | rust-d9c0eb8084deb65de69b23a7714b66efbff7eb03.tar.gz rust-d9c0eb8084deb65de69b23a7714b66efbff7eb03.zip | |
Use `target_vendor = "apple"` instead of `target_os = "..."`
Diffstat (limited to 'library/std/src/sys/pal/unix/mod.rs')
| -rw-r--r-- | library/std/src/sys/pal/unix/mod.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/library/std/src/sys/pal/unix/mod.rs b/library/std/src/sys/pal/unix/mod.rs index 3ef43a923a3..01d7fb31d7d 100644 --- a/library/std/src/sys/pal/unix/mod.rs +++ b/library/std/src/sys/pal/unix/mod.rs @@ -78,16 +78,12 @@ pub unsafe fn init(argc: isize, argv: *const *const u8, sigpipe: u8) { target_os = "emscripten", target_os = "fuchsia", target_os = "vxworks", - // The poll on Darwin doesn't set POLLNVAL for closed fds. - target_os = "macos", - target_os = "ios", - target_os = "tvos", - target_os = "watchos", - target_os = "visionos", target_os = "redox", target_os = "l4re", target_os = "horizon", target_os = "vita", + // The poll on Darwin doesn't set POLLNVAL for closed fds. + target_vendor = "apple", )))] 'poll: { use crate::sys::os::errno; @@ -406,7 +402,7 @@ cfg_if::cfg_if! { } else if #[cfg(target_os = "macos")] { #[link(name = "System")] extern "C" {} - } else if #[cfg(any(target_os = "ios", target_os = "tvos", target_os = "watchos", target_os = "visionos"))] { + } else if #[cfg(all(target_vendor = "apple", not(target_os = "macos")))] { #[link(name = "System")] #[link(name = "objc")] #[link(name = "Foundation", kind = "framework")] |
