update some testcases

This commit is contained in:
rofl0r
2021-12-12 15:59:34 +00:00
parent 7de7dd0de1
commit b83e90dcaf
2 changed files with 47 additions and 0 deletions

View File

@ -123,5 +123,17 @@ int main() {
ASSERT(ret == 0);
b.sin6_port = 0;
b.sin6_scope_id = 0;
memcpy(&b.sin6_addr,"\0\0\0\0" "\0\0\0\0" "\0\0\0\0" "\0\0\0\1", 16);
if ((ret = getnameinfo((void*)sb, sizeof b, hbuf, sizeof(hbuf), NULL,
0, NI_NUMERICHOST)) == 0)
printf("host=%s\n", hbuf);
else
printf("%s\n", gai_strerror(ret));
ASSERT(ret == 0);
return 0;
}