environ on macos uses directly libc which has the correct signature.
This commit is contained in:
parent
0157cc977f
commit
6f09370028
1 changed files with 1 additions and 4 deletions
|
@ -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"))]
|
||||
|
|
Loading…
Add table
Reference in a new issue