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

Rémi Denis-Courmont remi at remlab.net
Mon Jul 6 17:51:17 CEST 2015


Le lundi 06 juillet 2015, 17:03:25 KO Myung-Hun a écrit :
> 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 7ec7fa9..37ef7a3 100644
> --- a/src/misc/interrupt.c
> +++ b/src/misc/interrupt.c
> @@ -298,7 +298,11 @@ static int vlc_poll_i11e_inner(struct pollfd *restrict
> fds, unsigned nfds, fd[1] = fd[0];
>      else
>  # endif
> +#ifndef __OS2__
>      if (vlc_pipe(fd))
> +#else
> +    if (socketpair(AF_LOCAL, SOCK_STREAM, 0, fd))
> +#endif
>      {
>          vlc_testcancel();
>          errno = ENOMEM;

I was first tempted to ask to merge the endif and ifndef. But then I remembered 
that if pipes need a way to be polled anyhow. Otherwise, you are hosed.

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list