[PATCH 1/4] connection: Fix sendmsg() on BSD systems

Bill Spitzak spitzak at gmail.com
Sun Sep 28 18:54:44 PDT 2014


On 09/28/2014 11:49 AM, Karsten Otto wrote:

> +		msg.msg_control = NULL;
> +		msg.msg_controllen = 0;
>   		msg.msg_flags = 0;
>
> +		/* Only set msg_control when sending ancillary data */
> +		if (clen > 0) {
> +			msg.msg_controllen = clen;
> +			msg.msg_control = cmsg;
> +		}

How about:

   msg.msg_controllen = clen;
   msg.msg_control = clen ? cmsg : NULL;
   msg.msg_flags = 0;




More information about the wayland-devel mailing list