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

2014-09-28 Thread Jason Ekstrand
On Sep 28, 2014 6:54 PM, "Bill Spitzak" wrote: > > 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 */

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

2014-09-28 Thread Bill Spitzak
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_c

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

2014-09-28 Thread Karsten Otto
From: Philip Withnall BSD systems expect all unused fields in the msghdr struct to be initialized to 0 and NULL respectively, and returns EINVAL otherwise. It can't hurt to be tidy about things on other platforms either though. [KAO: Make comments refer to all BSD-like systems] --- src/connecti