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

src: conditionalize use of O_BINARY

The O_BINARY flag is not defined on all platforms so we must
conditionalize its use once we remove GNULIB.
Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 b0bea258
......@@ -1243,7 +1243,10 @@ virFDStreamOpenFileInternal(virStreamPtr st,
VIR_DEBUG("st=%p path=%s oflags=0x%x offset=%llu length=%llu mode=0%o",
st, path, oflags, offset, length, mode);
oflags |= O_NOCTTY | O_BINARY;
oflags |= O_NOCTTY;
#ifdef O_BINARY
oflags |= O_BINARY;
#endif
if (oflags & O_CREAT)
fd = open(path, oflags, mode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册