[RFC PATCH 2/2] getaddrinfo: Add AF_VSOCK support

Florian Weimer fweimer@redhat.com
Thu Oct 6 11:04:00 GMT 2016


On 09/29/2016 12:27 PM, Stefan Hajnoczi wrote:
> +  ai = *pai = malloc (sizeof (struct addrinfo) + sizeof (struct sockaddr_vm));

You should define a local struct type for this, to make it more obvious 
that you got the alignment correct.

 > +  ai->ai_addr = (void *) (ai + 1);

Then you can avoid this pointer arithmetic as well.

If we decide to add this functionality, we'll need tests for it.

Florian



More information about the Libc-alpha mailing list