fix some errors in libstd

This commit is contained in:
Michael Hewson 2017-12-22 12:40:39 -05:00
parent 0783db9e0f
commit e94b29065f
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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,