[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Substitute O_DSYNC with O_FSYNC as needed.
From: |
G 3 |
Subject: |
[Qemu-devel] [PATCH] Substitute O_DSYNC with O_FSYNC as needed. |
Date: |
Mon, 13 Jul 2009 15:42:12 -0400 |
This will allow raw-posix.c to compile on systems that don't have
O_SYNC defined.
Signed-off-by: John Arbuckle <address@hidden>
---
block/raw-posix.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 8b1e67c..d542591 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -81,8 +81,13 @@
/* 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 */
#ifndef O_DIRECT
--
1.6.3.3
- [Qemu-devel] [PATCH] Substitute O_DSYNC with O_FSYNC as needed.,
G 3 <=