mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
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: Pavel Hrdina <phrdina@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
b0bea258d3
commit
6dd8913207
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user