diff options
author | G 3 <programmingkidx@gmail.com> | 2009-07-01 13:28:32 -0400 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-07-10 17:15:03 -0500 |
commit | 960b646371d9c91bbb908fc97ae277a384777136 (patch) | |
tree | 705bf1c734231dff3afbc8a39b355795e5ee3e4b | |
parent | fc78bd45039bcc8f3c4572b5921cf5144d438d01 (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 af3d468750..49dd528d26 100644 --- a/block-raw-posix.c +++ b/block-raw-posix.c @@ -75,7 +75,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 */ |