Skip to content

Commit c227566

Browse files
committed
Fix native build.
Can't transmute a u32 to a pointer on a 64-bit platform. So we add an `as *const ()` as well.
1 parent ac9fe34 commit c227566

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/program.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ impl TransientProgramArea {
180180
drop(application_ram);
181181
let result = unsafe {
182182
let code: extern "C" fn(*const neotron_api::Api) -> i32 =
183-
::core::mem::transmute(start_addr);
183+
::core::mem::transmute(start_addr as *const ());
184184
code(&CALLBACK_TABLE)
185185
};
186186
Ok(result)

0 commit comments

Comments
 (0)