From aba69716e835e6f2398e82ddcba4b14c04495c02 Mon Sep 17 00:00:00 2001 From: Robert Spalek Date: Thu, 26 Oct 2006 20:08:09 -0700 Subject: [PATCH] fdatasync is not supported on Darwin ===> work-around --- lib/lfs.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/lfs.h b/lib/lfs.h index 274b72a7..3896c0e6 100644 --- a/lib/lfs.h +++ b/lib/lfs.h @@ -41,6 +41,12 @@ typedef struct stat sh_stat_t; #endif /* !CONFIG_LFS */ +#if defined(_POSIX_SYNCHRONIZED_IO) && (_POSIX_SYNCHRONIZED_IO > 0) +#define sh_fdatasync fdatasync +#else +#define sh_fdatasync fsync +#endif + #define HAVE_PREAD static inline sh_off_t -- 2.39.2