diff options
author | delphij <delphij@FreeBSD.org> | 2005-04-17 03:56:07 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2005-04-17 03:56:07 +0000 |
commit | 90a7ec34ec2cf5e36aeb76ff35c656f880659274 (patch) | |
tree | d032f8c0c396aaaa53b0b0adc86dd48f48cfc6d9 /lib | |
parent | e2b9708f180fa561f49f9097900a2f7eed03e290 (diff) | |
download | FreeBSD-src-90a7ec34ec2cf5e36aeb76ff35c656f880659274.zip FreeBSD-src-90a7ec34ec2cf5e36aeb76ff35c656f880659274.tar.gz |
Remove a check about whether sa->sa_len is equal to salen from
getnameinfo(3). POSIX standard does not require a sa_len field
in sockaddr struct, hence such requirement will cause problem
for portability.
PR: standards/80008
Requested by: Xin Liu <lx@knight.6test.edu.cn>
Reviewed by: freebsd-standards (das)
MFC After: 2 weeks
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/net/getnameinfo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/net/getnameinfo.c b/lib/libc/net/getnameinfo.c index cee07f6..906ce31 100644 --- a/lib/libc/net/getnameinfo.c +++ b/lib/libc/net/getnameinfo.c @@ -109,8 +109,10 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags) if (sa == NULL) return EAI_FAIL; +#ifdef BSD4_4 if (sa->sa_len != salen) return EAI_FAIL; +#endif family = sa->sa_family; for (i = 0; afdl[i].a_af; i++) |