From 9c1f3a0ef8fc5f3e2d70c7ccb8adb0ad2f2bf00b Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Mon, 3 Nov 2014 17:12:54 -0500 Subject: [PATCH] linux problem --- v/sist.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/v/sist.c b/v/sist.c index 978b8699a..01b3a44e2 100644 --- a/v/sist.c +++ b/v/sist.c @@ -77,7 +77,15 @@ u3_sist_pack(c3_w tem_w, c3_w typ_w, c3_w* bob_w, c3_w len_w) // Sync. Or, what goes by sync. { fsync(lug_u->fid_i); // fsync is almost useless, F_FULLFSYNC too slow +#if defined(U2_OS_linux) + fdatasync(lug_u->fid_i); +#elif defined(U2_OS_osx) fcntl(lug_u->fid_i, F_FULLFSYNC); +#elif defined(U2_OS_bsd) + fsync(lug_u->fid_i); +#else +# error "port: datasync" +#endif } return u3A->ent_d;