mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
lib: fix compiling error for type i8 in aarch64 environment
c_char is equal to i8 on x86, but it is equal to u8 on arm arch, so we need to use type c_char instead of i8 to avoid compiling error. Fixes: #9 Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
This commit is contained in:
@@ -766,7 +766,7 @@ pub fn nested_keyed_to_hashmap(mut file: File) -> Result<HashMap<String, HashMap
|
||||
/// with error: `Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }`
|
||||
pub fn libc_rmdir(p: &str) {
|
||||
// with int return value
|
||||
let _ = unsafe { libc::rmdir(p.as_ptr() as *const i8) };
|
||||
let _ = unsafe { libc::rmdir(p.as_ptr() as *const libc::c_char) };
|
||||
}
|
||||
|
||||
/// read and parse an i64 data
|
||||
|
||||
Reference in New Issue
Block a user