Skip to content

Commit 53ce068

Browse files
committed
Fix c-wrapper-crate template
1 parent 46e65b0 commit 53ce068

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

c-wrapper-crate/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ extern "C" {
66
fn bar() -> core::ffi::c_int;
77
}
88

9+
#[cfg(not(target_arch = "riscv64"))]
10+
unsafe fn bar() -> core::ffi::c_int {
11+
unreachable!()
12+
}
13+
914
pub fn value() -> u32 {
1015
(unsafe { bar() }) as u32
1116
}

0 commit comments

Comments
 (0)