All of lore.kernel.org
 help / color / mirror / Atom feed
From: G 3 <programmingkidx@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Substitute O_SYNC with O_FSYNC in block/raw-posix.c
Date: Thu, 25 Jun 2009 20:59:35 -0400	[thread overview]
Message-ID: <a8d88129bff47f8006a614998b63b302@gmail.com> (raw)

This patch will allow the file block/raw-posix.c to compile on gcc 3.3 
on Mac OS 10.3. Since the O_SYNC symbol is missing on this version of 
the Mac OS, O_FSYNC will be used in its place.

Signed-off-by: John Arbuckle <programmingkidx@gmail.com>

---
  block/raw-posix.c |    9 +++++++++
  1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/block/raw-posix.c b/block/raw-posix.c
index fa1a394..baff82d 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -79,6 +79,15 @@
  #define DEBUG_BLOCK_PRINT(formatCstr, ...)
  #endif

+/* Mac OS less than 10.4 doesn't have O_SYNC */
+#ifndef O_SYNC
+#ifdef O_FSYNC
+#define O_SYNC O_FSYNC
+#else
+#define O_SYNC 0
+#endif
+#endif
+
  /* OS X does not have O_DSYNC */
  #ifndef O_DSYNC
  #define O_DSYNC O_SYNC
-- 
1.6.3.3

             reply	other threads:[~2009-06-26  0:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-26  0:59 G 3 [this message]
2009-06-26 17:55 ` [Qemu-devel] [PATCH] Substitute O_SYNC with O_FSYNC in block/raw-posix.c Christoph Hellwig
     [not found]   ` <3b18e1127cac98f7cacb6cca22fed96e@gmail.com>
     [not found]     ` <20090701135404.GB16868@lst.de>
2009-07-01 17:28       ` [Qemu-devel] [PATCH] Substitute O_DSYNC with O_SYNC or O_FSYNC when needed G 3
2009-07-02  8:48         ` [Qemu-devel] " Christoph Hellwig

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=a8d88129bff47f8006a614998b63b302@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.