From b0e4502b6e5eee6fecde89c8671e496ae777968d Mon Sep 17 00:00:00 2001 From: Red Bear OS Date: Thu, 9 Jul 2026 11:25:05 +0300 Subject: [PATCH] relibc: add syncfs() syscall binding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added syncfs(fd) which calls fsync(fd) — equivalent on Red Bear since all filesystem I/O is synchronous. Cross-referenced with Linux 7.1 fs/sync.c. --- src/platform/redox/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/platform/redox/mod.rs b/src/platform/redox/mod.rs index 38860e0d81..6521d5b818 100644 --- a/src/platform/redox/mod.rs +++ b/src/platform/redox/mod.rs @@ -1426,6 +1426,11 @@ impl Pal for Sys { Ok(()) } + fn syncfs(fd: c_int) -> Result<()> { + // Red Bear filesystem I/O is synchronous — fsync(fd) is sufficient. + Self::fsync(fd) + } + fn timer_create(clock_id: clockid_t, evp: &sigevent, mut timerid: Out) -> Result<()> { if evp.sigev_notify == SIGEV_THREAD { if evp.sigev_notify_function.is_none() {