diff --git a/tools/vsh.c b/tools/vsh.c index ef4cf5c6bd..59e9aab6cc 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: