projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix x32 unistd macros to report as ILP32 not LP64
[musl]
/
src
/
network
/
getnameinfo.c
diff --git
a/src/network/getnameinfo.c
b/src/network/getnameinfo.c
index
3484fc6
..
5e6fae3
100644
(file)
--- a/
src/network/getnameinfo.c
+++ b/
src/network/getnameinfo.c
@@
-135,13
+135,13
@@
int getnameinfo(const struct sockaddr *restrict sa, socklen_t sl,
switch (af) {
case AF_INET:
a = (void *)&((struct sockaddr_in *)sa)->sin_addr;
switch (af) {
case AF_INET:
a = (void *)&((struct sockaddr_in *)sa)->sin_addr;
- if (sl
!=
sizeof(struct sockaddr_in)) return EAI_FAMILY;
+ if (sl
<
sizeof(struct sockaddr_in)) return EAI_FAMILY;
mkptr4(ptr, a);
scopeid = 0;
break;
case AF_INET6:
a = (void *)&((struct sockaddr_in6 *)sa)->sin6_addr;
mkptr4(ptr, a);
scopeid = 0;
break;
case AF_INET6:
a = (void *)&((struct sockaddr_in6 *)sa)->sin6_addr;
- if (sl
!=
sizeof(struct sockaddr_in6)) return EAI_FAMILY;
+ if (sl
<
sizeof(struct sockaddr_in6)) return EAI_FAMILY;
if (memcmp(a, "\0\0\0\0\0\0\0\0\0\0\xff\xff", 12))
mkptr6(ptr, a);
else
if (memcmp(a, "\0\0\0\0\0\0\0\0\0\0\xff\xff", 12))
mkptr6(ptr, a);
else