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

Pass envp to main

parent 019011f0
No related branches found
No related tags found
No related merge requests found
......@@ -61,7 +61,7 @@ impl Stack {
#[no_mangle]
pub unsafe extern "C" fn _start_rust(sp: &'static Stack) -> ! {
extern "C" {
fn main(argc: isize, argv: *const *const u8) -> c_int;
fn main(argc: isize, argv: *const *const c_char, envp: *const *const c_char) -> c_int;
}
let argc = sp.argc();
......@@ -89,7 +89,7 @@ pub unsafe extern "C" fn _start_rust(sp: &'static Stack) -> ! {
platform::inner_environ.push(ptr::null_mut());
platform::environ = platform::inner_environ.as_mut_ptr();
platform::exit(main(argc, argv));
platform::exit(main(argc, argv as *const *const c_char, envp as *const *const c_char));
}
#[panic_implementation]
......
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