Skip to content

Commit

Permalink
fix some errors in libstd
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeyhew committed Dec 22, 2017
1 parent 0783db9 commit e94b290
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libstd/sys/unix/os.rs
Expand Up @@ -453,7 +453,7 @@ pub fn getenv(k: &OsStr) -> io::Result<Option<OsString>> {
let k = CString::new(k.as_bytes())?;
unsafe {
ENV_LOCK.lock();
let s = libc::getenv(k.as_ptr()) as *const _;
let s = libc::getenv(k.as_ptr()) as *const libc::c_char;
let ret = if s.is_null() {
None
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys_common/gnu/libbacktrace.rs
Expand Up @@ -73,7 +73,7 @@ pub fn resolve_symname<F>(frame: Frame,
"failed to allocate libbacktrace state")
)
}
let mut data = ptr::null();
let mut data: *const libc::c_char = ptr::null();
let data_addr = &mut data as *mut *const libc::c_char;
let ret = unsafe {
backtrace_syminfo(state,
Expand Down

0 comments on commit e94b290

Please sign in to comment.