mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-15 05:26:47 +00:00
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:
commit
b97f375ea2
@ -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"))]
|
||||
|
Loading…
Reference in New Issue
Block a user