summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2005-04-17 03:56:07 +0000
committerdelphij <delphij@FreeBSD.org>2005-04-17 03:56:07 +0000
commit90a7ec34ec2cf5e36aeb76ff35c656f880659274 (patch)
treed032f8c0c396aaaa53b0b0adc86dd48f48cfc6d9 /lib
parente2b9708f180fa561f49f9097900a2f7eed03e290 (diff)
downloadFreeBSD-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.c2
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++)
OpenPOWER on IntegriCloud