File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ use rustix_futex_sync::Mutex;
30
30
/// `mem` should point to the stack as provided by the operating system.
31
31
#[ cfg( any( feature = "origin-start" , feature = "external-start" ) ) ]
32
32
pub ( super ) unsafe extern "C" fn entry ( mem : * mut usize ) -> ! {
33
+ use linux_raw_sys:: ctypes:: c_uint;
34
+
33
35
extern "C" {
34
36
fn main ( argc : c_int , argv : * mut * mut u8 , envp : * mut * mut u8 ) -> c_int ;
35
37
}
@@ -75,7 +77,7 @@ pub(super) unsafe extern "C" fn entry(mem: *mut usize) -> ! {
75
77
// Compute `argc`, `argv`, and `envp`.
76
78
let argc = * mem as c_int ;
77
79
let argv = mem. add ( 1 ) . cast :: < * mut u8 > ( ) ;
78
- let envp = argv. add ( argc as usize + 1 ) ;
80
+ let envp = argv. add ( argc as c_uint as usize + 1 ) ;
79
81
80
82
// Do a few more precondition checks on `argc` and `argv`.
81
83
debug_assert ! ( argc >= 0 ) ;
You can’t perform that action at this time.
0 commit comments