summaryrefslogtreecommitdiffstats
path: root/compat/fake-rfc2553.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-23 20:00:49 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-23 20:00:49 (GMT)
commit9cf461e48a4c2c2f43280c36d5f95d43b4627923 (patch)
tree8d4027aeceb147a672264448aab2b874f17c36e1 /compat/fake-rfc2553.c
parent0f4f2c96dbb37a7c1608a39301529456c0a52880 (diff)
downloadtcl-9cf461e48a4c2c2f43280c36d5f95d43b4627923.zip
tcl-9cf461e48a4c2c2f43280c36d5f95d43b4627923.tar.gz
tcl-9cf461e48a4c2c2f43280c36d5f95d43b4627923.tar.bz2
Bug [3599194]: compat/fake-rfc2553.c is broken
Diffstat (limited to 'compat/fake-rfc2553.c')
-rw-r--r--compat/fake-rfc2553.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/compat/fake-rfc2553.c b/compat/fake-rfc2553.c
index 666144f..3b91041 100644
--- a/compat/fake-rfc2553.c
+++ b/compat/fake-rfc2553.c
@@ -84,7 +84,7 @@ int fake_getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
if (host != NULL) {
if (flags & NI_NUMERICHOST) {
- int len;
+ size_t len;
Tcl_MutexLock(&netdbMutex);
len = strlcpy(host, inet_ntoa(sin->sin_addr), hostlen);
Tcl_MutexUnlock(&netdbMutex);
@@ -135,7 +135,7 @@ fake_gai_strerror(int err)
#ifndef HAVE_FREEADDRINFO
void
-freeaddrinfo(struct addrinfo *ai)
+fake_freeaddrinfo(struct addrinfo *ai)
{
struct addrinfo *next;
@@ -199,7 +199,7 @@ fake_getaddrinfo(const char *hostname, const char *servname,
port = strtol(servname, &cp, 10);
if (port > 0 && port <= 65535 && *cp == '\0')
- port = htons(port);
+ port = htons((unsigned short)port);
else if ((sp = getservbyname(servname, NULL)) != NULL)
port = sp->s_port;
else