diff options
author | G 3 <programmingkidx@gmail.com> | 2009-07-01 13:28:32 -0400 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-07-09 16:58:07 -0500 |
commit | 1c27a8b35ed2736a0542983facbe861d44785a44 (patch) | |
tree | 4d4b0b31572b16587cf64577379641126860ac7c | |
parent | c76f4952bbf47116255bc00780ceae3bc8a657c0 (diff) |
Substitute O_DSYNC with O_SYNC or O_FSYNC when needed.
Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | block/raw-posix.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 */ |