aboutsummaryrefslogtreecommitdiff
path: root/ctr-std/src/sys/unix/os.rs
diff options
context:
space:
mode:
authorlinouxis9 <[email protected]>2018-05-07 15:31:54 +0200
committerlinouxis9 <[email protected]>2018-05-07 15:35:20 +0200
commit4901431b02227416b08e5fbc9a7ac3f5ac2f44a7 (patch)
tree7fb75cf805b8f0e9b7f169af37c9d2aa0c4aded6 /ctr-std/src/sys/unix/os.rs
parentMerge pull request #66 from FenrirWolf/swkbd (diff)
downloadctru-rs-4901431b02227416b08e5fbc9a7ac3f5ac2f44a7.tar.xz
ctru-rs-4901431b02227416b08e5fbc9a7ac3f5ac2f44a7.zip
Update for latest nightly 2018-05-06
Diffstat (limited to 'ctr-std/src/sys/unix/os.rs')
-rw-r--r--ctr-std/src/sys/unix/os.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ctr-std/src/sys/unix/os.rs b/ctr-std/src/sys/unix/os.rs
index 5de756d..3a944dc 100644
--- a/ctr-std/src/sys/unix/os.rs
+++ b/ctr-std/src/sys/unix/os.rs
@@ -61,7 +61,7 @@ pub fn getcwd() -> io::Result<PathBuf> {
unsafe {
let ptr = buf.as_mut_ptr() as *mut libc::c_char;
if !libc::getcwd(ptr, buf.capacity()).is_null() {
- let len = CStr::from_ptr(buf.as_ptr() as *const libc::c_char).to_bytes().len();
+ let len = CStr::from_ptr(buf.as_ptr() as *const _).to_bytes().len();
buf.set_len(len);
buf.shrink_to_fit();
return Ok(PathBuf::from(OsString::from_vec(buf)));
@@ -85,7 +85,7 @@ pub fn chdir(p: &path::Path) -> io::Result<()> {
let p: &OsStr = p.as_ref();
let p = CString::new(p.as_bytes())?;
unsafe {
- match libc::chdir(p.as_ptr()) == (0 as c_int) {
+ match libc::chdir(p.as_ptr() as *const _) == (0 as c_int) {
true => Ok(()),
false => Err(io::Error::last_os_error()),
}