Skip to content

Commit e1ed91d

Browse files
committed
Fix a warning on Android.
1 parent fa6dd11 commit e1ed91d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/backend/libc/fs/syscalls.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,13 +1445,20 @@ fn stat64_to_stat(s64: c::stat64) -> io::Result<Stat> {
14451445
mod sys {
14461446
use super::{c, BorrowedFd, Statx};
14471447

1448+
// Some versions of the libc bindings don't have these, so provide
1449+
// our own definitions (which may become unused when libc gains
1450+
// bindings for them).
14481451
#[cfg(all(target_os = "android", target_arch = "arm"))]
1452+
#[allow(dead_code)]
14491453
const SYS_statx: c::c_long = 397;
14501454
#[cfg(all(target_os = "android", target_arch = "x86"))]
1455+
#[allow(dead_code)]
14511456
const SYS_statx: c::c_long = 383;
14521457
#[cfg(all(target_os = "android", target_arch = "aarch64"))]
1458+
#[allow(dead_code)]
14531459
const SYS_statx: c::c_long = 291;
14541460
#[cfg(all(target_os = "android", target_arch = "x86_64"))]
1461+
#[allow(dead_code)]
14551462
const SYS_statx: c::c_long = 332;
14561463

14571464
weak_or_syscall! {

0 commit comments

Comments
 (0)