[vlc-devel] commit "gnutls: use vectorized sends on all platforms" breaks Android

Andrey Gursky andrey.gursky at e-mail.ua
Mon Jan 18 15:22:04 CET 2016


On Mon, 18 Jan 2016 11:01:51 +0200
Rémi Denis-Courmont <remi at remlab.net> wrote:

> Le 2016-01-18 03:57, Andrey Gursky a écrit :
> > Hi,
> >
> > was it not a little bit to optimistic to remove #ifdef IOV_MAX?
> 
> It was there to protect the sendmsg() call, as sendmsg() was missing on 
> Windows. We have a replacement now.

Please believe me, I wouldn't complain about it if it wouldn't break a
build on Android. One should use 4 context lines for diff and things
become very clear:

---------------------------- modules/misc/gnutls.c ----------------------------
index 8b3e224..0d0f737 100644

-#ifdef IOV_MAX
 static ssize_t vlc_gnutls_writev (gnutls_transport_ptr_t ptr,
                                   const giovec_t *giov, int iovcnt)
 {
     if (unlikely((unsigned)iovcnt > IOV_MAX))
@@ -156,9 +155,8 @@ static ssize_t vlc_gnutls_writev (gnutls_transport_ptr_t ptr,
     }
 
     return sendmsg (fd, &msg, MSG_NOSIGNAL);
 }
-#endif

IOV_MAX is used for a comparison.

Regards,
Andrey


More information about the vlc-devel mailing list