[PATCH] Unix datagram socket messaging

Andrew Bartlett abartlet at samba.org
Wed Apr 16 16:28:21 MDT 2014


On Wed, 2014-04-16 at 12:00 +0200, Stefan (metze) Metzmacher wrote:
> In
> https://git.samba.org/?p=vl/samba.git/.git;a=commitdiff;h=777954434bb7404659fbb7f519a4069b1100c400
> we have
> 
> +       struct sockaddr_un addr = { 0, };
> 
> ...
> 
> +               ret = bind(ctx->sock, (struct sockaddr *)&addr,
> sizeof(addr));
> 
> I think we should cast with (struct sockaddr *)(void *)&addr, in order
> to avoid
> strict aliasing warnings on some systems.

When this breaks, hasn't all the of Samba and all the other software
written for BSD sockets also broken?  

Andrew Bartlett

-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba






More information about the samba-technical mailing list