[vlc-devel] [PATCH 2/6] os2: filesystem: set pipes to binary mode

KO Myung-Hun komh78 at gmail.com
Wed Jun 10 05:27:25 CEST 2015


---
 src/os2/filesystem.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/os2/filesystem.c b/src/os2/filesystem.c
index 5a22f0b..51a4447 100644
--- a/src/os2/filesystem.c
+++ b/src/os2/filesystem.c
@@ -34,6 +34,7 @@
 
 #include <sys/types.h>
 #include <unistd.h>
+#include <io.h>
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <dirent.h>
@@ -338,6 +339,9 @@ int vlc_pipe (int fds[2])
     if (pipe (fds))
         return -1;
 
+    setmode (fds[0], O_BINARY);
+    setmode (fds[1], O_BINARY);
+
     fcntl (fds[0], F_SETFD, FD_CLOEXEC);
     fcntl (fds[1], F_SETFD, FD_CLOEXEC);
     return 0;
-- 
1.9.5




More information about the vlc-devel mailing list