vlc | branch: master | KO Myung-Hun <[email protected]> | Wed Jan 20 10:49:00 2021 +0100| [63dc94937e782ee43987389ce0316ddc1da4242c] | committer: Steve Lhomme
os2: filesystem: implement vlc_dup2() Signed-off-by: Steve Lhomme <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=63dc94937e782ee43987389ce0316ddc1da4242c --- src/os2/filesystem.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/os2/filesystem.c b/src/os2/filesystem.c index 124b80a1fb..95a1299bca 100644 --- a/src/os2/filesystem.c +++ b/src/os2/filesystem.c @@ -263,6 +263,15 @@ int vlc_dup (int oldfd) return newfd; } +int vlc_dup2 (int oldfd, int newfd) +{ + int fd = dup2 (oldfd, newfd); + if (fd != -1) + setmode (fd, O_BINARY); + + return fd; +} + int vlc_pipe (int fds[2]) { if (vlc_socketpair (AF_LOCAL, SOCK_STREAM, 0, fds, false)) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
