Skip to content

Commit 03cc757

Browse files
committed
std: more fixes for os.rs for windows
1 parent 7a5ee37 commit 03cc757

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libstd/os.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,8 @@ pub fn make_dir(p: &Path, mode: c_int) -> bool {
642642
use os::win32::as_utf16_p;
643643
// FIXME: turn mode into something useful? #2623
644644
do as_utf16_p(p.to_str()) |buf| {
645-
libc::CreateDirectoryW(buf, ptr::null()) != (0 as libc::BOOL)
645+
libc::CreateDirectoryW(buf, ptr::null() as LPCWSTR)
646+
!= (0 as libc::BOOL)
646647
}
647648
}
648649
}
@@ -1081,7 +1082,7 @@ pub fn last_os_error() -> ~str {
10811082

10821083
let mut buf = [0 as c_char, ..TMPBUF_SZ];
10831084

1084-
do buf.as_imm_buf |buf, len| {
1085+
do buf.as_mut_buf |buf, len| {
10851086
unsafe {
10861087
let res = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM |
10871088
FORMAT_MESSAGE_IGNORE_INSERTS,

0 commit comments

Comments
 (0)