On 29 April 2015 at 12:22, Francois Gouget fgouget@free.fr wrote:
The timeout receives a 64 bit value so using an unsigned int would not work.
Do you mean for "timeout" or for the assignment to "optval"? The current code is pretty much just broken for negative values. Since it's a timeout I'm guessing those just aren't supposed to happen, but in that case get_rcvsnd_timeo() should return a UINT64, and the assignment to "optval" should use e.g. "*(unsigned int *)optval = ...;".