Skip to content

Commit 5adcafb

Browse files
committed
DO NOT MERGE: temporary cast fix for execvp to work with libc 0.2
The libc 0.2 signature uses *const *const c_char while libc 1.0 uses *const *mut c_char (which is more POSIX-accurate). This cast allows CI to pass until the libc crate is updated. Remove this commit once libc with QuRT support is published.
1 parent e5dc775 commit 5adcafb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • library/std/src/sys/process/unix

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,8 @@ impl Command {
405405
*sys::env::environ() = envp.as_ptr();
406406
}
407407

408-
libc::execvp(self.get_program_cstr().as_ptr(), self.get_argv().as_ptr() as *const *mut _);
408+
// Cast to *const *const to match libc 0.2 signature; libc 1.0 uses *const *mut
409+
libc::execvp(self.get_program_cstr().as_ptr(), self.get_argv().as_ptr() as *const *const _);
409410
Err(io::Error::last_os_error())
410411
}
411412

0 commit comments

Comments
 (0)