Subject: Bug [3599194]: compat/fake-rfc2553.c is broken

From: "jan.nijtmans" <[email-masked]>
Date: Sat, 23 Feb 2013 20:00:49 +0000

---
 ChangeLog             | 5 +++++
 compat/fake-rfc2553.c | 6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7710ce6..24f793d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-23  Jan Nijtmans  <[email-masked]>
+
+	* compat/fake-rfc2553.c: [Bug 3599194]: compat/fake-rfc2553.c is
+	broken.
+
 2013-02-22  Don Porter  <[email-masked]>
 
 	* generic/tclAssembly.c:	Shift more burden of smart cleanup
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
-- 
cgit v0.12