Additional changes to make -Wshadow build on Ubuntu 10.04.

Looks like they defined basename() in string.h and ntohs/htonl are
implemented in terms of __bswap16() which is a macro with tmp
variables and so one cannot embed one call to ntohs/htons in another.
Not good but we workaround this limitation in glibc.
This commit is contained in:
Roland C. Dowdeswell
2012-06-07 16:59:01 +01:00
parent 5459558dea
commit abdde6a608
6 changed files with 47 additions and 46 deletions

View File

@@ -268,6 +268,7 @@ send_via_proxy (krb5_context context,
int ret;
krb5_socket_t s = rk_INVALID_SOCKET;
char portstr[NI_MAXSERV];
int tmp;
if (proxy == NULL)
return ENOMEM;
@@ -280,8 +281,8 @@ send_via_proxy (krb5_context context,
memset (&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
snprintf (portstr, sizeof(portstr), "%d",
ntohs(init_port (colon, htons(80))));
tmp = init_port (colon, htons(80));
snprintf (portstr, sizeof(portstr), "%d", ntohs(tmp));
ret = getaddrinfo (proxy, portstr, &hints, &ai);
free (proxy2);
if (ret)