Skip to content
Snippets Groups Projects
Verified Commit 23a8855e authored by jD91mZM2's avatar jD91mZM2
Browse files

Fix garbage env pointer to main on redox

parent 40a7380a
Branches
Tags
No related merge requests found
Pipeline #929 passed with warnings
......@@ -63,10 +63,7 @@ impl Stack {
#[no_mangle]
pub unsafe extern "C" fn _start_rust(sp: &'static Stack) -> ! {
extern "C" {
#[cfg(not(target_os = "redox"))]
fn main(argc: isize, argv: *const *const c_char, envp: *const *const c_char) -> c_int;
#[cfg(target_os = "redox")]
fn main(argc: isize, argv: *const *const c_char) -> c_int;
}
let argc = sp.argc();
......@@ -119,6 +116,7 @@ pub unsafe extern "C" fn _start_rust(sp: &'static Stack) -> ! {
platform::exit(main(
argc,
argv as *const *const c_char,
platform::environ as *const *const c_char
));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment