Overview
| Artifact ID: | 327e61d66a491b616f684677771313b060824a47 |
|---|---|
| Ticket: | 3599194fffffffffffffffffffffffffffffffff
compat/fake-rfc2553.c is broken |
| User & Date: | afredd on 2013-01-02 10:44:01 |
Changes
- assignee changed to: "mdejong"
- cmimetype changed to: "text/plain"
- comment changed to:
The function freeaddrinfo() in fake-rfc2553.c should be called fake_freeaddrinfo() since the header file fake-rfc2553.h has: #ifndef HAVE_FREEADDRINFO #define freeaddrinfo(a) (fake_freeaddrinfo(a)) void freeaddrinfo(struct addrinfo *); #endif /* !HAVE_FREEADDRINFO */ When compiled it fails to find a definition for fake_freeaddrinfo! Here is a patch diff to fix this and a couple of other issues the compiler found. diff --git a/compat/fake-rfc2553.c b/compat/fake-rfc2553.c index 666144f..3bb2834 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 - foundin changed to: "current: 8.6.0"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "afredd"
- subsystem changed to: "52. Portability Support"
- title changed to: "compat/fake-rfc2553.c is broken"
- type changed to: "Bug"