From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJzn5-000772-8G for qemu-devel@nongnu.org; Thu, 25 Jun 2009 20:59:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJzn0-00075m-SX for qemu-devel@nongnu.org; Thu, 25 Jun 2009 20:59:42 -0400 Received: from [199.232.76.173] (port=35176 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJzn0-00075h-Kc for qemu-devel@nongnu.org; Thu, 25 Jun 2009 20:59:38 -0400 Received: from mail-yx0-f192.google.com ([209.85.210.192]:32789) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJzn0-0000Op-AX for qemu-devel@nongnu.org; Thu, 25 Jun 2009 20:59:38 -0400 Received: by yxe30 with SMTP id 30so3229496yxe.4 for ; Thu, 25 Jun 2009 17:59:37 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v624) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed From: G 3 Date: Thu, 25 Jun 2009 20:59:35 -0400 Subject: [Qemu-devel] [PATCH] Substitute O_SYNC with O_FSYNC in block/raw-posix.c List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- 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