From: G 3 <programmingkidx@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Substitute O_DSYNC with O_FSYNC as needed.
Date: Mon, 13 Jul 2009 15:42:12 -0400 [thread overview]
Message-ID: <d1a96f318dec73be8ee16cc8c3780229@gmail.com> (raw)
In-Reply-To: <4a5b8c54.8753f10a.7315.5fd8SMTPIN_ADDED@mx.google.com>
This will allow raw-posix.c to compile on systems that don't have
O_SYNC defined.
Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
---
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
next parent reply other threads:[~2009-07-13 19:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4a5b8c54.8753f10a.7315.5fd8SMTPIN_ADDED@mx.google.com>
2009-07-13 19:42 ` G 3 [this message]
2009-07-13 20:05 ` [Qemu-devel] [PATCH] Substitute O_DSYNC with O_FSYNC as needed Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d1a96f318dec73be8ee16cc8c3780229@gmail.com \
--to=programmingkidx@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).