pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NVMM not working anymore in qemu since 6.1.0 upgrade

Dear Martin,

On 2021-09-18, Martin Husemann wrote:
> On Sat, Sep 18, 2021 at 04:43:59PM +0200, Yorick Hardy wrote:
> > -    ret = getnameinfo((const struct sockaddr *) &inso->, sizeof(inso->, addrstr, sizeof(addrstr), portstr, sizeof(portstr), NI_NUMERICHOST|NI_NUMERICSERV);
> > +    if (inso-> == AF_INET)
> > +        addrlen = sizeof(struct sockaddr_in);
> Shouldn't that be addrlen = ((const struct sockaddr *)&inso->>sa_len
> instead?

Hmm, you are right - I did think of that and it would be much better.
Did I misread SUSV? It says:

 The <sys/socket.h> header shall define the sockaddr structure that includes
 at least the following members:

 sa_family_t  sa_family  Address family.
 char         sa_data[]  Socket address (variable-length data).


 The sockaddr_storage structure shall include at least the following members:

 sa_family_t ss_family

but I could not find sa_len mentioned (but perhaps I did not search enough).

Kind regards,

Yorick Hardy

Home | Main Index | Thread Index | Old Index