From 1c27a8b35ed2736a0542983facbe861d44785a44 Mon Sep 17 00:00:00 2001 From: G 3 Date: Wed, 1 Jul 2009 13:28:32 -0400 Subject: [PATCH] Substitute O_DSYNC with O_SYNC or O_FSYNC when needed. Signed-off-by: John Arbuckle Signed-off-by: Anthony Liguori --- block/raw-posix.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/block/raw-posix.c b/block/raw-posix.c index 985bf69e50..fa4f83e8fc 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -81,7 +81,11 @@ /* OS X does not have O_DSYNC */ #ifndef O_DSYNC +#ifdef O_SYNC #define O_DSYNC O_SYNC +#elif defined(O_FSYNC) +#define O_DSYNC O_FSYNC +#endif #endif /* Approximate O_DIRECT with O_DSYNC if O_DIRECT isn't available */