diff --git a/native/src/base/lib.rs b/native/src/base/lib.rs index 10bbe67fb..a17971aa3 100644 --- a/native/src/base/lib.rs +++ b/native/src/base/lib.rs @@ -42,11 +42,11 @@ pub mod ffi { #[namespace = "rust"] extern "Rust" { fn xpipe2(fds: &mut [i32; 2], flags: i32) -> i32; - #[rust_name = "fd_path_for_cxx"] - fn fd_path(fd: i32, buf: &mut [u8]) -> isize; - #[rust_name = "map_file_for_cxx"] - fn map_file(path: &[u8], rw: bool) -> &'static mut [u8]; - #[rust_name = "map_fd_for_cxx"] - fn map_fd(fd: i32, sz: usize, rw: bool) -> &'static mut [u8]; + #[cxx_name = "fd_path"] + fn fd_path_for_cxx(fd: i32, buf: &mut [u8]) -> isize; + #[cxx_name = "map_file"] + fn map_file_for_cxx(path: &[u8], rw: bool) -> &'static mut [u8]; + #[cxx_name = "map_fd"] + fn map_fd_for_cxx(fd: i32, sz: usize, rw: bool) -> &'static mut [u8]; } } diff --git a/native/src/boot/lib.rs b/native/src/boot/lib.rs index c02761fef..ead6d0894 100644 --- a/native/src/boot/lib.rs +++ b/native/src/boot/lib.rs @@ -23,12 +23,12 @@ pub mod ffi { fn decompress(buf: &[u8], fd: i32) -> bool; include!("bootimg.hpp"); - #[rust_name = "BootImage"] - type boot_img; - #[rust_name = "payload"] - fn get_payload(self: &BootImage) -> &[u8]; - #[rust_name = "tail"] - fn get_tail(self: &BootImage) -> &[u8]; + #[cxx_name = "boot_img"] + type BootImage; + #[cxx_name = "get_payload"] + fn payload(self: &BootImage) -> &[u8]; + #[cxx_name = "get_tail"] + fn tail(self: &BootImage) -> &[u8]; } extern "Rust" {