提交 b0bea258 编写于 作者: D Daniel P. Berrangé

src: conditionalize use of O_DIRECT

The O_DIRECT flag is not available on all platforms, so we
must introduce a compat define the same way gnulib does.
Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 4b9919af
......@@ -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)
{
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册