[vlc-devel] [PATCH 2/4] src: misc: use socketpair() instead of vlc_pipe() on OS/2

KO Myung-Hun komh78 at gmail.com
Mon Sep 7 08:56:40 CEST 2015


On OS/2, poll() using select() works only on a socket. However, any
other IO functions work with a socket.
---
 src/misc/interrupt.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/misc/interrupt.c b/src/misc/interrupt.c
index c2a07d2..9144093 100644
--- a/src/misc/interrupt.c
+++ b/src/misc/interrupt.c
@@ -377,7 +377,11 @@ static int vlc_poll_i11e_inner(struct pollfd *restrict fds, unsigned nfds,
         fd[1] = fd[0];
     else
 # endif
+# ifdef __OS2__
+    if (socketpair(AF_LOCAL, SOCK_STREAM, 0, fd))
+# else
     if (vlc_pipe(fd))
+# endif
     {
         vlc_testcancel();
         errno = ENOMEM;
-- 
1.9.5



More information about the vlc-devel mailing list