diff --git a/src/util/iohelper.c b/src/util/iohelper.c index d864bbeaed..618bfb1d3d 100644 --- a/src/util/iohelper.c +++ b/src/util/iohelper.c @@ -39,6 +39,10 @@ #define VIR_FROM_THIS VIR_FROM_STORAGE +#ifndef O_DIRECT +# define O_DIRECT 0 +#endif + static int runIO(const char *path, int fd, int oflags) { diff --git a/src/util/virfile.c b/src/util/virfile.c index d0e0062aa7..efa59f2b13 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -95,6 +95,10 @@ VIR_LOG_INIT("util.file"); +#ifndef O_DIRECT +# define O_DIRECT 0 +#endif + int virFileClose(int *fdptr, virFileCloseFlags flags) { int saved_errno = 0;