diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-12-05 00:37:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-05 00:37:55 +0100 |
| commit | b97f375ea2c40926d941138a0b3e858ed3799071 (patch) | |
| tree | 45f2f82f7eb4d01dcb5859c6f8c66ca0f8163f68 /library/std | |
| parent | efec545293b9263be9edfb283a7aa66350b3acbf (diff) | |
| parent | 6f09370028341778c07d822c2c59947bed30fa90 (diff) | |
| download | rust-b97f375ea2c40926d941138a0b3e858ed3799071.tar.gz rust-b97f375ea2c40926d941138a0b3e858ed3799071.zip | |
Rollup merge of #89642 - devnexen:macos_getenv_chng, r=m-ou-se
environ on macos uses directly libc which has the correct signature.
Diffstat (limited to 'library/std')
| -rw-r--r-- | library/std/src/sys/unix/os.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/library/std/src/sys/unix/os.rs b/library/std/src/sys/unix/os.rs index e48b589f7d8..8a028d99306 100644 --- a/library/std/src/sys/unix/os.rs +++ b/library/std/src/sys/unix/os.rs @@ -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"))] |
