From e2ae28c815140215fb0d8a4f7cbf6aaf1a0093b6 Mon Sep 17 00:00:00 2001 From: Wolfgang Silbermayr Date: Fri, 7 Dec 2018 07:06:09 +0100 Subject: [PATCH] Use libc c_char instead of i8 for libc strlen() call --- core-foundation/src/url.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core-foundation/src/url.rs b/core-foundation/src/url.rs index edf1de88b..199ad2ec8 100644 --- a/core-foundation/src/url.rs +++ b/core-foundation/src/url.rs @@ -20,7 +20,7 @@ use std::ptr; use std::path::{Path, PathBuf}; use std::mem; -use libc::{strlen, PATH_MAX}; +use libc::{c_char, strlen, PATH_MAX}; #[cfg(unix)] use std::os::unix::ffi::OsStrExt; @@ -83,7 +83,7 @@ impl CFURL { if result == false as Boolean { return None; } - let len = strlen(buf.as_ptr() as *const i8); + let len = strlen(buf.as_ptr() as *const c_char); let path = OsStr::from_bytes(&buf[0..len]); Some(PathBuf::from(path)) }