Skip to content

Commit ebf70a9

Browse files
libstd needs update for pending libc change
Fixes rust-lang#39868
1 parent 62eb605 commit ebf70a9

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/libstd/sys/unix/os.rs

-11
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,6 @@ pub fn home_dir() -> Option<PathBuf> {
483483
target_os = "nacl",
484484
target_os = "emscripten")))]
485485
unsafe fn fallback() -> Option<OsString> {
486-
#[cfg(not(target_os = "solaris"))]
487486
unsafe fn getpwduid_r(me: libc::uid_t, passwd: &mut libc::passwd,
488487
buf: &mut Vec<c_char>) -> Option<()> {
489488
let mut result = ptr::null_mut();
@@ -495,16 +494,6 @@ pub fn home_dir() -> Option<PathBuf> {
495494
}
496495
}
497496

498-
#[cfg(target_os = "solaris")]
499-
unsafe fn getpwduid_r(me: libc::uid_t, passwd: &mut libc::passwd,
500-
buf: &mut Vec<c_char>) -> Option<()> {
501-
// getpwuid_r semantics is different on Illumos/Solaris:
502-
// http://illumos.org/man/3c/getpwuid_r
503-
let result = libc::getpwuid_r(me, passwd, buf.as_mut_ptr(),
504-
buf.capacity());
505-
if result.is_null() { None } else { Some(()) }
506-
}
507-
508497
let amt = match libc::sysconf(libc::_SC_GETPW_R_SIZE_MAX) {
509498
n if n < 0 => 512 as usize,
510499
n => n as usize,

0 commit comments

Comments
 (0)