Rollup merge of #89642 - devnexen:macos_getenv_chng, r=m-ou-se

environ on macos uses directly libc which has the correct signature.
This commit is contained in:
Matthias Krüger 2021-12-05 00:37:55 +01:00 committed by GitHub
commit b97f375ea2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -473,10 +473,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"))]