[vlc-devel] [PATCH 3/3] configure: check for msg_flags in struct msghdr
Rémi Denis-Courmont
remi at remlab.net
Tue Apr 19 11:08:59 CEST 2016
Le 2016-04-19 01:10, Sean McGovern a écrit :
> diff --git a/modules/access/udp.c b/modules/access/udp.c
> index f1f4047..4c9a32b 100644
> --- a/modules/access/udp.c
> +++ b/modules/access/udp.c
> @@ -302,7 +302,7 @@ static void* ThreadRead( void *data )
> struct msghdr msg = {
> .msg_iov = &iov,
> .msg_iovlen = 1,
> -#ifdef __linux__
> +#if HAVE_MSG_FLAGS && defined(MSG_TRUNC)
> .msg_flags = MSG_TRUNC,
> #endif
And exactly WTF is this supposed to achieve? Break all OSes other than
Linux/Android?
> };
> @@ -332,7 +332,7 @@ static void* ThreadRead( void *data )
> while (len == -1);
> vlc_cleanup_pop();
>
> -#ifdef MSG_TRUNC
> +#if HAVE_MSG_FLAGS && defined(MSG_TRUNC)
> if (msg.msg_flags & MSG_TRUNC)
> {
> msg_Err(access, "%zd bytes packet truncated (MTU was
> %zu)",
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list