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
No related branches found
No related tags found
No related merge requests found
......@@ -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.
Finish editing this message first!
Please register or to comment