environ on macos uses directly libc which has the correct signature.

This commit is contained in:
David CARLIER 2021-10-07 20:47:17 +01:00
parent 0157cc977f
commit 6f09370028

View file

@ -472,10 +472,7 @@ impl Iterator for Env {
#[cfg(target_os = "macos")]
pub unsafe fn environ() -> *mut *const *const c_char {
extern "C" {
fn _NSGetEnviron() -> *mut *const *const c_char;
}
_NSGetEnviron()
libc::_NSGetEnviron() as *mut *const *const c_char
}
#[cfg(not(target_os = "macos"))]