[libvirt PATCH v2 49/56] tools: conditionalize use of O_SYNC flag

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

 



The O_SYNC flag is not defined on Windows platforms.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 tools/vsh.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/vsh.c b/tools/vsh.c
index 2cf3dab054..cd473ef1d6 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -2152,7 +2152,11 @@ vshEventCleanup(vshControl *ctl)
     virEventUpdateTimeout(ctl->eventTimerId, -1);
 }
 
-#define LOGFILE_FLAGS (O_WRONLY | O_APPEND | O_CREAT | O_SYNC)
+#ifdef O_SYNC
+# define LOGFILE_FLAGS (O_WRONLY | O_APPEND | O_CREAT | O_SYNC)
+#else
+# define LOGFILE_FLAGS (O_WRONLY | O_APPEND | O_CREAT)
+#endif
 
 /**
  * vshOpenLogFile:
-- 
2.24.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux