about summary refs log tree commit diff
path: root/library/std/src/sys/pal/unix/mod.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-07-30 04:31:55 +0200
committerGitHub <noreply@github.com>2024-07-30 04:31:55 +0200
commitf396a42ed6cad32dc6f5860b49f85f0d9a10a997 (patch)
tree618fbf4e163055d706a90d3ca9b7a5f21bdfd76b /library/std/src/sys/pal/unix/mod.rs
parent6b23cb5cdfa4348e7c77d166506fa868ed48f28e (diff)
parent0a5a84ee3427756c2329fa08905d3b186b58dcd3 (diff)
downloadrust-f396a42ed6cad32dc6f5860b49f85f0d9a10a997.tar.gz
rust-f396a42ed6cad32dc6f5860b49f85f0d9a10a997.zip
Rollup merge of #128315 - zetanumbers:psvita-unsafe-in-unsafe, r=workingjubilee
Fix vita build of std and forbid unsafe in unsafe in the os/vita module

See #127747

r? `@workingjubilee`

`@pheki` `@nikarh`
Diffstat (limited to 'library/std/src/sys/pal/unix/mod.rs')
-rw-r--r--library/std/src/sys/pal/unix/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/std/src/sys/pal/unix/mod.rs b/library/std/src/sys/pal/unix/mod.rs
index 4898bdd2fa3..3fc51ff59a9 100644
--- a/library/std/src/sys/pal/unix/mod.rs
+++ b/library/std/src/sys/pal/unix/mod.rs
@@ -166,6 +166,7 @@ pub unsafe fn init(argc: isize, argv: *const *const u8, sigpipe: u8) {
             target_os = "fuchsia",
             target_os = "horizon",
             target_os = "vxworks",
+            target_os = "vita",
             // Unikraft's `signal` implementation is currently broken:
             // https://github.com/unikraft/lib-musl/issues/57
             target_vendor = "unikraft",
@@ -212,6 +213,7 @@ pub unsafe fn init(argc: isize, argv: *const *const u8, sigpipe: u8) {
     target_os = "fuchsia",
     target_os = "horizon",
     target_os = "vxworks",
+    target_os = "vita",
 )))]
 static ON_BROKEN_PIPE_FLAG_USED: crate::sync::atomic::AtomicBool =
     crate::sync::atomic::AtomicBool::new(false);
@@ -222,6 +224,7 @@ static ON_BROKEN_PIPE_FLAG_USED: crate::sync::atomic::AtomicBool =
     target_os = "fuchsia",
     target_os = "horizon",
     target_os = "vxworks",
+    target_os = "vita",
 )))]
 pub(crate) fn on_broken_pipe_flag_used() -> bool {
     ON_BROKEN_PIPE_FLAG_USED.load(crate::sync::atomic::Ordering::Relaxed)