[vlc-devel] [PATCH] misc: do not call vlc_poll_i11e() in vlc_{readv|writev}_i11e on OS/2

KO Myung-Hun komh78 at gmail.com
Mon Jul 6 10:53:45 CEST 2015


OS/2 vlc_poll() does not accept non-socket fds.
---
 src/misc/interrupt.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/misc/interrupt.c b/src/misc/interrupt.c
index 37ef7a3..590343a 100644
--- a/src/misc/interrupt.c
+++ b/src/misc/interrupt.c
@@ -400,6 +400,7 @@ int vlc_poll_i11e(struct pollfd *fds, unsigned nfds, int timeout)
  */
 ssize_t vlc_readv_i11e(int fd, struct iovec *iov, int count)
 {
+#ifndef __OS2__
     struct pollfd ufd;
 
     ufd.fd = fd;
@@ -407,6 +408,7 @@ ssize_t vlc_readv_i11e(int fd, struct iovec *iov, int count)
 
     if (vlc_poll_i11e(&ufd, 1, -1) < 0)
         return -1;
+#endif
     return readv(fd, iov, count);
 }
 
@@ -419,6 +421,7 @@ ssize_t vlc_readv_i11e(int fd, struct iovec *iov, int count)
  */
 ssize_t vlc_writev_i11e(int fd, const struct iovec *iov, int count)
 {
+#ifndef __OS2__
     struct pollfd ufd;
 
     ufd.fd = fd;
@@ -426,6 +429,7 @@ ssize_t vlc_writev_i11e(int fd, const struct iovec *iov, int count)
 
     if (vlc_poll_i11e(&ufd, 1, -1) < 0)
         return -1;
+#endif
     return writev(fd, iov, count);
 }
 
-- 
1.9.5




More information about the vlc-devel mailing list