Commit 1c27a8b35ed2736a0542983facbe861d44785a44
Committed by
Anthony Liguori
1 parent
c76f4952
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>
Showing
1 changed file
with
4 additions
and
0 deletions
block/raw-posix.c
@@ -81,7 +81,11 @@ | @@ -81,7 +81,11 @@ | ||
81 | 81 | ||
82 | /* OS X does not have O_DSYNC */ | 82 | /* OS X does not have O_DSYNC */ |
83 | #ifndef O_DSYNC | 83 | #ifndef O_DSYNC |
84 | +#ifdef O_SYNC | ||
84 | #define O_DSYNC O_SYNC | 85 | #define O_DSYNC O_SYNC |
86 | +#elif defined(O_FSYNC) | ||
87 | +#define O_DSYNC O_FSYNC | ||
88 | +#endif | ||
85 | #endif | 89 | #endif |
86 | 90 | ||
87 | /* Approximate O_DIRECT with O_DSYNC if O_DIRECT isn't available */ | 91 | /* Approximate O_DIRECT with O_DSYNC if O_DIRECT isn't available */ |