qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] improved patch from block-raw-posix.c


From: G 3
Subject: [Qemu-devel] [PATCH] improved patch from block-raw-posix.c
Date: Sun, 21 Jun 2009 19:55:43 -0400

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 <address@hidden>
--- /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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]