Remove printf() linking hack

This commit is contained in:
Justine Tunney 2023-06-17 10:13:50 -07:00
parent ba03cd95c5
commit b881c0ec9e
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
107 changed files with 1520 additions and 2577 deletions

View file

@ -103,9 +103,12 @@ int getnameinfo(const struct sockaddr *addr, socklen_t addrlen, char *name,
if (service != NULL && servicelen != 0) {
if ((flags & NI_NUMERICSERV) ||
LookupServicesByPort(port, ((flags & NI_DGRAM) ? "udp" : "tcp"), 4,
info, sizeof(info), NULL) == -1)
itoa(port, info, 10);
if (strlen(info) + 1 > servicelen) return EAI_OVERFLOW;
info, sizeof(info), NULL) == -1) {
FormatInt32(info, port);
}
if (strlen(info) + 1 > servicelen) {
return EAI_OVERFLOW;
}
strcpy(service, info);
}