fix some errors in libstd
This commit is contained in:
parent
0783db9e0f
commit
e94b29065f
|
@ -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 {
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue