[PATCH] Unix datagram socket messaging

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Apr 16 05:03:55 MDT 2014


On Wed, Apr 16, 2014 at 12:55:54PM +0200, Stefan (metze) Metzmacher wrote:
> > The correct way to avoid this is to do a memcpy. I will
> > convert to that.
> 
> I don't think so 'struct sockaddr' is too small, as far
> as I can tell this is the only way to avoid this warnings,
> other than defining a union, which would be overkill for this case.

No, it is not. This is a strict requirement I guess if we
want our code to be future-proof against the more and more
aggressive compiler optimizations. I will consult the C
standard if a union is sufficient here.

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba-technical mailing list