This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC PATCH 2/2] getaddrinfo: Add AF_VSOCK support
- From: Florian Weimer <fweimer at redhat dot com>
- To: Stefan Hajnoczi <stefanha at redhat dot com>
- Cc: libc-alpha at sourceware dot org, Jorgen Hansen <jhansen at vmware dot com>
- Date: Thu, 6 Oct 2016 13:03:56 +0200
- Subject: Re: [RFC PATCH 2/2] getaddrinfo: Add AF_VSOCK support
- Authentication-results: sourceware.org; auth=none
- References: <1475144848-4446-1-git-send-email-stefanha@redhat.com> <1475144848-4446-3-git-send-email-stefanha@redhat.com>
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