Commit f646557804b8da6386e0de5b97bb680ee52e236f
1 parent
9f7965c7
Define O_DSYNC as O_SYNC if necessary.
O_DSYNC isn't available on OS X. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5486 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
5 additions
and
0 deletions
block-raw-posix.c
| @@ -73,6 +73,11 @@ | @@ -73,6 +73,11 @@ | ||
| 73 | #define DEBUG_BLOCK_PRINT(formatCstr, args...) | 73 | #define DEBUG_BLOCK_PRINT(formatCstr, args...) |
| 74 | #endif | 74 | #endif |
| 75 | 75 | ||
| 76 | +/* OS X does not have O_DSYNC */ | ||
| 77 | +#ifndef O_DSYNC | ||
| 78 | +#define O_SYNC | ||
| 79 | +#endif | ||
| 80 | + | ||
| 76 | /* Approximate O_DIRECT with O_DSYNC if O_DIRECT isn't available */ | 81 | /* Approximate O_DIRECT with O_DSYNC if O_DIRECT isn't available */ |
| 77 | #ifndef O_DIRECT | 82 | #ifndef O_DIRECT |
| 78 | #define O_DIRECT O_DSYNC | 83 | #define O_DIRECT O_DSYNC |