From 9eacf8efc4a8025ac060b53a9d93e38fe60b24cb Mon Sep 17 00:00:00 2001 From: Red Bear OS Date: Thu, 9 Jul 2026 11:36:25 +0300 Subject: [PATCH] pal: add syncfs to Pal trait (default calls fsync) --- src/platform/pal/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/platform/pal/mod.rs b/src/platform/pal/mod.rs index ad31680e0b..e9e263d13e 100644 --- a/src/platform/pal/mod.rs +++ b/src/platform/pal/mod.rs @@ -140,6 +140,11 @@ pub trait Pal { /// Platform implementation of [`fsync()`](crate::header::unistd::fsync) from [`unistd.h`](crate::header::unistd). fn fsync(fildes: c_int) -> Result<()>; + /// Platform implementation of [`syncfs()`](crate::header::unistd::syncfs) from [`unistd.h`](crate::header::unistd). + fn syncfs(fd: c_int) -> Result<()> { + Self::fsync(fd) + } + /// Platform implementation of [`ftruncate()`](crate::header::unistd::ftruncate) from [`unistd.h`](crate::header::unistd). fn ftruncate(fildes: c_int, length: off_t) -> Result<()>;