aboutsummaryrefslogtreecommitdiff
path: root/ctr-std/src/sys/unix/os.rs
diff options
context:
space:
mode:
authorFenrirWolf <[email protected]>2018-06-10 11:49:19 -0600
committerGitHub <[email protected]>2018-06-10 11:49:19 -0600
commit49041a4e56a4cab33ae7889537d33670e8b012fb (patch)
tree0c931e8716200f9aa8c7daef47b62474d0285d5c /ctr-std/src/sys/unix/os.rs
parentMerge pull request #69 from FenrirWolf/libctru-1.5.0 (diff)
parentFixes according to Fenrir's review (diff)
downloadarchived-ctru-rs-49041a4e56a4cab33ae7889537d33670e8b012fb.tar.xz
archived-ctru-rs-49041a4e56a4cab33ae7889537d33670e8b012fb.zip
Merge pull request #68 from linouxis9/master
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()),
}