Remove warnings on Windows

This commit is contained in:
Zhi Guan
2026-05-27 22:07:03 +08:00
parent efddfc5ac5
commit 2c0053dd85
7 changed files with 9 additions and 9 deletions

View File

@@ -597,7 +597,11 @@ bad:
}
if (!(hp = gethostbyname(host))) {
#ifdef WIN32
fprintf(stderr, "%s: parse -host value error: %d\n", prog, WSAGetLastError());
#else
fprintf(stderr, "%s: parse -host value error: %s\n", prog, hstrerror(h_errno));
#endif
goto end;
}
server.sin_addr = *((struct in_addr *)hp->h_addr_list[0]);