[libvirt PATCH 27/32] src: conditionalize use of O_BINARY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The O_BINARY flag is not defined on all platforms so we must
conditionalize its use once we remove GNULIB.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 src/util/virfdstream.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/util/virfdstream.c b/src/util/virfdstream.c
index a903107afb..58b77aa6fa 100644
--- a/src/util/virfdstream.c
+++ b/src/util/virfdstream.c
@@ -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);
-- 
2.24.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux