From f8d6eea2dcc5197778a23d32254e12da332218da Mon Sep 17 00:00:00 2001 From: Justin Tracey Date: Tue, 27 May 2025 20:53:54 -0400 Subject: [PATCH] sync: remove Android workaround The libc crate now exposes Android's sync like other unix platforms. --- src/uu/sync/src/sync.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/uu/sync/src/sync.rs b/src/uu/sync/src/sync.rs index abcdf4099..a299f4ea5 100644 --- a/src/uu/sync/src/sync.rs +++ b/src/uu/sync/src/sync.rs @@ -38,13 +38,9 @@ mod platform { use uucore::error::UResult; /// # Safety - /// This function is unsafe because it calls `libc::sync` or `libc::syscall` which are unsafe. + /// This function is unsafe because it calls `libc::sync` which is unsafe. pub unsafe fn do_sync() -> UResult<()> { unsafe { - // see https://github.com/rust-lang/libc/pull/2161 - #[cfg(target_os = "android")] - libc::syscall(libc::SYS_sync); - #[cfg(not(target_os = "android"))] libc::sync(); } Ok(())