From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MIWt2-0006g0-Rr for qemu-devel@nongnu.org; Sun, 21 Jun 2009 19:55:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MIWt2-0006fY-CC for qemu-devel@nongnu.org; Sun, 21 Jun 2009 19:55:48 -0400 Received: from [199.232.76.173] (port=38736 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIWt2-0006fO-8r for qemu-devel@nongnu.org; Sun, 21 Jun 2009 19:55:48 -0400 Received: from yw-out-1718.google.com ([74.125.46.157]:57898) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MIWt1-0008D3-S7 for qemu-devel@nongnu.org; Sun, 21 Jun 2009 19:55:48 -0400 Received: by yw-out-1718.google.com with SMTP id 5so1581311ywr.82 for ; Sun, 21 Jun 2009 16:55:47 -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: Sun, 21 Jun 2009 19:55:43 -0400 Subject: [Qemu-devel] [PATCH] improved patch from 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 is an improvement over a previous patch for the file block-raw-posix.c. This time the code checks to see if O_FSYNC is defined before defining O_SYNC as O_FSYNC. If it isn't defined, then it defines O_SYNC as 0. signed-off-by: ProgrammingKid --- /Users/misbah/Desktop/block-raw-posix-original.c Wed May 20 16:46:58 2009 +++ /Users/misbah/Desktop/block-raw-posix.c Sun Jun 21 19:48:15 2009 @@ -73,6 +73,16 @@ #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 + #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