From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQRPs-0003U7-Ox for qemu-devel@nongnu.org; Mon, 13 Jul 2009 15:42:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQRPo-0003T9-8a for qemu-devel@nongnu.org; Mon, 13 Jul 2009 15:42:24 -0400 Received: from [199.232.76.173] (port=46397 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQRPo-0003T1-3g for qemu-devel@nongnu.org; Mon, 13 Jul 2009 15:42:20 -0400 Received: from mail-ew0-f207.google.com ([209.85.219.207]:61739) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MQRPn-0007PA-PO for qemu-devel@nongnu.org; Mon, 13 Jul 2009 15:42:19 -0400 Received: by ewy3 with SMTP id 3so2448688ewy.34 for ; Mon, 13 Jul 2009 12:42:18 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v624) In-Reply-To: <4a5b8c54.8753f10a.7315.5fd8SMTPIN_ADDED@mx.google.com> References: <4a5b8c54.8753f10a.7315.5fd8SMTPIN_ADDED@mx.google.com> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: G 3 Date: Mon, 13 Jul 2009 15:42:12 -0400 Subject: [Qemu-devel] [PATCH] Substitute O_DSYNC with O_FSYNC as needed. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This will allow raw-posix.c to compile on systems that don't have O_SYNC defined. Signed-off-by: John Arbuckle --- 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