Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHqDg-00071x-O5 for qemu-devel@nongnu.org; Fri, 19 Jun 2009 22:22:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHqDc-00071B-9X for qemu-devel@nongnu.org; Fri, 19 Jun 2009 22:22:16 -0400 Received: from [199.232.76.173] (port=60262 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHqDc-000718-2j for qemu-devel@nongnu.org; Fri, 19 Jun 2009 22:22:12 -0400 Received: from mail-gx0-f207.google.com ([209.85.217.207]:46536) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MHqDb-0004Az-RI for qemu-devel@nongnu.org; Fri, 19 Jun 2009 22:22:11 -0400 Received: by gxk3 with SMTP id 3so8246564gxk.10 for ; Fri, 19 Jun 2009 19:22:10 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v624) Content-Transfer-Encoding: 7bit Message-Id: <20f282157f4df2f513fdb51427be26c7@hotpop.com> Content-Type: text/plain; charset=US-ASCII; format=flowed From: m a Date: Fri, 19 Jun 2009 22:22:07 -0400 Subject: [Qemu-devel] [PATCH] replace O_SYNC with O_FSYNC List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This patch replaces O_SYNC with O_FSYNC. These two flags do the same thing, but only O_FSYNC is available in Mac OS 10.3 and under. It only replaces O_SYNC if it doesn't exist. This patch allows the file block-raw-posix.c to compile on Mac OS 10.3. This is my first time submitting a patch, so there might have been a few mistakes made. --- block-raw-posix.c Wed May 20 16:46:58 2009 +++ block-raw-posix (updated).c Fri Jun 19 22:01:07 2009 @@ -73,6 +73,12 @@ #define DEBUG_BLOCK_PRINT(formatCstr, args...) #endif +// O_SYNC isn't available on Mac OS 10.3 and under +// O_SYNC and O_FSYNC do the same thing +#ifndef O_SYNC +#define O_SYNC O_FSYNC +#endif + /* OS X does not have O_DSYNC */ #ifndef O_DSYNC #define O_DSYNC O_SYNC