You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2023/01/12 12:28:11 UTC

[nuttx] branch master updated: fs: Map syncfs to fsync

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 9ae3f4cf17 fs: Map syncfs to fsync
9ae3f4cf17 is described below

commit 9ae3f4cf17de12acc5c80a5cc2a3e7e1460a5ca4
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Wed Jan 11 23:24:23 2023 +0800

    fs: Map syncfs to fsync
    
    https://linux.die.net/man/2/syncfs
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 include/unistd.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/unistd.h b/include/unistd.h
index c0c8d487c1..41c1125a6c 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -260,6 +260,7 @@
 /* Helpers and legacy compatibility definitions */
 
 #define link(p1, p2)                     symlink((p1), (p2))
+#define syncfs(f)                        fsync(f)
 #define fdatasync(f)                     fsync(f)
 #define getdtablesize(f)                 ((int)sysconf(_SC_OPEN_MAX))
 #define getpagesize(f)                   ((int)sysconf(_SC_PAGESIZE))