Skip to content

Commit e94b290

Browse files
committed
fix some errors in libstd
1 parent 0783db9 commit e94b290

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/libstd/sys/unix/os.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ pub fn getenv(k: &OsStr) -> io::Result<Option<OsString>> {
453453
let k = CString::new(k.as_bytes())?;
454454
unsafe {
455455
ENV_LOCK.lock();
456-
let s = libc::getenv(k.as_ptr()) as *const _;
456+
let s = libc::getenv(k.as_ptr()) as *const libc::c_char;
457457
let ret = if s.is_null() {
458458
None
459459
} else {

src/libstd/sys_common/gnu/libbacktrace.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub fn resolve_symname<F>(frame: Frame,
7373
"failed to allocate libbacktrace state")
7474
)
7575
}
76-
let mut data = ptr::null();
76+
let mut data: *const libc::c_char = ptr::null();
7777
let data_addr = &mut data as *mut *const libc::c_char;
7878
let ret = unsafe {
7979
backtrace_syminfo(state,

0 commit comments

Comments
 (0)