mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-03 01:38:30 +00:00
Remove printf() linking hack
This commit is contained in:
parent
ba03cd95c5
commit
b881c0ec9e
107 changed files with 1520 additions and 2577 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue