aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-14 18:00:38 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-14 18:00:38 +0000
commitf646557804b8da6386e0de5b97bb680ee52e236f (patch)
tree0a74afbb16b2fc8a49330261e4ee96da9f59e69d
parent9f7965c7e965c8b80da27048017a360b3c57c4af (diff)
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
-rw-r--r--block-raw-posix.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/block-raw-posix.c b/block-raw-posix.c
index 4c04dbf8da..74a9f52071 100644
--- a/block-raw-posix.c
+++ b/block-raw-posix.c
@@ -73,6 +73,11 @@
#define DEBUG_BLOCK_PRINT(formatCstr, args...)
#endif
+/* OS X does not have O_DSYNC */
+#ifndef O_DSYNC
+#define O_SYNC
+#endif
+
/* Approximate O_DIRECT with O_DSYNC if O_DIRECT isn't available */
#ifndef O_DIRECT
#define O_DIRECT O_DSYNC