rust/minijail: Fix cast to c_char. am: 11395a6982 am: 036c252f23 am: af243930d7
Original change: https://android-review.googlesource.com/c/platform/external/minijail/+/1682968
Change-Id: I0f06081d9db9e4bf0493f66ce76731c4807dd6c1
diff --git a/rust/minijail/src/lib.rs b/rust/minijail/src/lib.rs
index 8500a1f..ba9c8af 100644
--- a/rust/minijail/src/lib.rs
+++ b/rust/minijail/src/lib.rs
@@ -885,9 +885,9 @@
// Using libc to open/close FDs for testing.
const FILE_PATH: &[u8] = b"/dev/null\0";
let j = Minijail::new().unwrap();
- let first = libc::open(FILE_PATH.as_ptr() as *const i8, libc::O_RDONLY);
+ let first = libc::open(FILE_PATH.as_ptr() as *const c_char, libc::O_RDONLY);
assert!(first >= 0);
- let second = libc::open(FILE_PATH.as_ptr() as *const i8, libc::O_RDONLY);
+ let second = libc::open(FILE_PATH.as_ptr() as *const c_char, libc::O_RDONLY);
assert!(second >= 0);
let fds: Vec<RawFd> = vec![0, 1, 2, first];
if j.fork(Some(&fds)).unwrap() == 0 {