[PATCH] Fix strict-aliasing warning in resolv/res_hconf.c

Roland McGrath roland@hack.frob.com
Wed May 20 07:56:00 GMT 2015


> I am not sure if I am just missing an include or if I simply cannot use
> the sockaddr_in struct in this header.

You cannot.  It's a public header and it does not (and should not) define
any of the AF-specific struct sockaddr_foo types.  I don't think this
interface can be used in a strictly standard-C-compliant fashion.  We need
to come up with an idiom or helper code to facilitate using it in whatever
fashion is closest to compliant and is in fact thoroughly safe.  Maybe Paul
has some ideas.



More information about the Libc-alpha mailing list