tools: conditionalize use of O_SYNC flag

The O_SYNC flag is not defined on Windows platforms.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2020-01-24 15:22:41 +00:00
parent cc46e137eb
commit c7aac54bc1

View File

@ -2152,7 +2152,11 @@ vshEventCleanup(vshControl *ctl)
virEventUpdateTimeout(ctl->eventTimerId, -1); 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: * vshOpenLogFile: