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

Andrey Gursky andrey.gursky at e-mail.ua
Mon Jan 18 16:00:39 CET 2016


On Mon, 18 Jan 2016 15:50:22 +0100
Jean-Baptiste Kempf <jb at videolan.org> wrote:

> On 18 Jan, Rémi Denis-Courmont wrote :
> > Le 2016-01-18 16:22, Andrey Gursky a écrit :
> > >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.
> > 
> > Heh, I wrote that ifdef and the code within it. I know why I added that
> > ifdef (because Windows lacked sendmsg()), as I do why I removed it (because
> > we have a replacement for sendmsg(() now).
> > 
> > IOV_MAX is *not* an optional fancy part of sendmsg(), or more generally, I/O
> > vectors support. IOV_MAX exists to prevent overflows when copying or
> > converting the vectors. VLC can't do without it, and the Linux kernel
> > couldn't do without it either.
> 
> It seems that one needs to call sysconf(_SC_IOV_MAX) if IOV_MAX is not
> defined in limits.h (XSI extension).

Or (in the context of my patch) rely on the man page:
"On Linux, the limit advertised by these mechanisms is 1024, which is
the true kernel limit."

> 
> Not sure if Android is wrong there.

Perhaps they patched the kernel so hard, that even this limit has
been changed?

--
Andrey Gursky


More information about the vlc-devel mailing list