Skip to content

Commit 9a6c84e

Browse files
committed
fix: psvita's std code
1 parent 4ea98d7 commit 9a6c84e

File tree

3 files changed

+4
-37
lines changed

3 files changed

+4
-37
lines changed

std/src/os/vita/raw.rs

-37
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
)]
1111
#![allow(deprecated)]
1212

13-
use crate::os::raw::c_long;
14-
use crate::os::unix::raw::{gid_t, uid_t};
15-
1613
#[stable(feature = "pthread_t", since = "1.8.0")]
1714
pub type pthread_t = libc::pthread_t;
1815

@@ -34,37 +31,3 @@ pub type off_t = libc::off_t;
3431

3532
#[stable(feature = "raw_ext", since = "1.1.0")]
3633
pub type time_t = libc::time_t;
37-
38-
#[repr(C)]
39-
#[derive(Clone)]
40-
#[stable(feature = "raw_ext", since = "1.1.0")]
41-
pub struct stat {
42-
#[stable(feature = "raw_ext", since = "1.1.0")]
43-
pub st_dev: dev_t,
44-
#[stable(feature = "raw_ext", since = "1.1.0")]
45-
pub st_ino: ino_t,
46-
#[stable(feature = "raw_ext", since = "1.1.0")]
47-
pub st_mode: mode_t,
48-
#[stable(feature = "raw_ext", since = "1.1.0")]
49-
pub st_nlink: nlink_t,
50-
#[stable(feature = "raw_ext", since = "1.1.0")]
51-
pub st_uid: uid_t,
52-
#[stable(feature = "raw_ext", since = "1.1.0")]
53-
pub st_gid: gid_t,
54-
#[stable(feature = "raw_ext", since = "1.1.0")]
55-
pub st_rdev: dev_t,
56-
#[stable(feature = "raw_ext", since = "1.1.0")]
57-
pub st_size: off_t,
58-
#[stable(feature = "raw_ext", since = "1.1.0")]
59-
pub st_atime: time_t,
60-
#[stable(feature = "raw_ext", since = "1.1.0")]
61-
pub st_mtime: time_t,
62-
#[stable(feature = "raw_ext", since = "1.1.0")]
63-
pub st_ctime: time_t,
64-
#[stable(feature = "raw_ext", since = "1.1.0")]
65-
pub st_blksize: blksize_t,
66-
#[stable(feature = "raw_ext", since = "1.1.0")]
67-
pub st_blocks: blkcnt_t,
68-
#[stable(feature = "raw_ext", since = "1.1.0")]
69-
pub st_spare4: [c_long; 2usize],
70-
}

std/src/sys/pal/unix/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ pub unsafe fn init(argc: isize, argv: *const *const u8, sigpipe: u8) {
165165
target_os = "fuchsia",
166166
target_os = "horizon",
167167
target_os = "vxworks",
168+
target_os = "vita",
168169
// Unikraft's `signal` implementation is currently broken:
169170
// https://github.com/unikraft/lib-musl/issues/57
170171
target_vendor = "unikraft",
@@ -211,6 +212,7 @@ pub unsafe fn init(argc: isize, argv: *const *const u8, sigpipe: u8) {
211212
target_os = "fuchsia",
212213
target_os = "horizon",
213214
target_os = "vxworks",
215+
target_os = "vita",
214216
)))]
215217
static ON_BROKEN_PIPE_FLAG_USED: crate::sync::atomic::AtomicBool =
216218
crate::sync::atomic::AtomicBool::new(false);
@@ -221,6 +223,7 @@ static ON_BROKEN_PIPE_FLAG_USED: crate::sync::atomic::AtomicBool =
221223
target_os = "fuchsia",
222224
target_os = "horizon",
223225
target_os = "vxworks",
226+
target_os = "vita",
224227
)))]
225228
pub(crate) fn on_broken_pipe_flag_used() -> bool {
226229
ON_BROKEN_PIPE_FLAG_USED.load(crate::sync::atomic::Ordering::Relaxed)

std/src/sys/pal/unix/process/process_common.rs

+1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ pub struct StdioPipes {
128128

129129
// passed to do_exec() with configuration of what the child stdio should look
130130
// like
131+
#[cfg_attr(target_os = "vita", allow(dead_code))]
131132
pub struct ChildPipes {
132133
pub stdin: ChildStdio,
133134
pub stdout: ChildStdio,

0 commit comments

Comments
 (0)