Skip to content

Commit b97f375

Browse files
authored
Rollup merge of #89642 - devnexen:macos_getenv_chng, r=m-ou-se
environ on macos uses directly libc which has the correct signature.
2 parents efec545 + 6f09370 commit b97f375

File tree

1 file changed

+1
-4
lines changed
  • library/std/src/sys/unix

1 file changed

+1
-4
lines changed

Diff for: library/std/src/sys/unix/os.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -473,10 +473,7 @@ impl Iterator for Env {
473473

474474
#[cfg(target_os = "macos")]
475475
pub unsafe fn environ() -> *mut *const *const c_char {
476-
extern "C" {
477-
fn _NSGetEnviron() -> *mut *const *const c_char;
478-
}
479-
_NSGetEnviron()
476+
libc::_NSGetEnviron() as *mut *const *const c_char
480477
}
481478

482479
#[cfg(not(target_os = "macos"))]

0 commit comments

Comments
 (0)