Skip to content

Commit

Permalink
Fix a warning on Android.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Mar 18, 2023
1 parent ba3609c commit 3762e1a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/backend/libc/weak.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,13 @@ unsafe fn fetch(name: &str) -> *mut c_void {

#[cfg(not(any(target_os = "android", target_os = "linux")))]
macro_rules! syscall {
(fn $name:ident($($arg_name:ident: $t:ty),*) via $_sys_name:ident -> $ret:ty) => (
(fn $name:ident($($arg_name:ident: $t:ty),*) via $sys_name:ident -> $ret:ty) => (
unsafe fn $name($($arg_name: $t),*) -> $ret {
weak! { fn $name($($t),*) -> $ret }

// In this configuration we always call libc and never use `sys_name`.
let _ = $sys_name;

if let Some(fun) = $name.get() {
fun($($arg_name),*)
} else {
Expand Down

0 comments on commit 3762e1a

Please sign in to comment.