From: G 3 Date: Wed, 1 Jul 2009 17:28:32 +0000 (-0400) Subject: Substitute O_DSYNC with O_SYNC or O_FSYNC when needed. X-Git-Tag: pull-nvme-20200902~15451 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1c27a8b35ed2736a0542983facbe861d44785a44;p=qemu-nvme.git Substitute O_DSYNC with O_SYNC or O_FSYNC when needed. Signed-off-by: John Arbuckle Signed-off-by: Anthony Liguori --- 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 */