Skip to content

Commit 5305773

Browse files
committed
Use unsupported args for espidf and vita
1 parent 6ffebb6 commit 5305773

File tree

3 files changed

+2
-14
lines changed

3 files changed

+2
-14
lines changed

library/std/src/sys/args/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#![forbid(unsafe_op_in_unsafe_fn)]
44

55
cfg_if::cfg_if! {
6-
if #[cfg(target_family = "unix")] {
6+
if #[cfg(all(target_family = "unix", not(any(target_os = "espidf", target_os = "vita"))))] {
77
mod unix;
88
pub use unix::*;
99
} else if #[cfg(target_family = "windows")] {

library/std/src/sys/args/unix.rs

-13
Original file line numberDiff line numberDiff line change
@@ -226,16 +226,3 @@ mod imp {
226226
(argc as isize, argv.cast())
227227
}
228228
}
229-
230-
#[cfg(any(target_os = "espidf", target_os = "vita"))]
231-
mod imp {
232-
use crate::ffi::c_char;
233-
use crate::ptr;
234-
235-
#[inline(always)]
236-
pub unsafe fn init(_argc: isize, _argv: *const *const u8) {}
237-
238-
pub fn argc_argv() -> (isize, *const *const c_char) {
239-
(0, ptr::null())
240-
}
241-
}

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

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ pub unsafe fn init(argc: isize, argv: *const *const u8, sigpipe: u8) {
4646
reset_sigpipe(sigpipe);
4747

4848
stack_overflow::init();
49+
#[cfg(not(target_os = "vita"))]
4950
crate::sys::args::init(argc, argv);
5051

5152
// Normally, `thread::spawn` will call `Thread::set_name` but since this thread

0 commit comments

Comments
 (0)