diff options
author | Kristian Høgsberg <krh@redhat.com> | 2005-06-22 01:21:24 +0000 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2005-06-22 01:21:24 +0000 |
commit | f5a6a188407cec6e567070d192aac2db72cacd92 (patch) | |
tree | f4195febc2aea6a4101bac3e34ac3d5293eb3908 /Xtranssock.c | |
parent | 5bad61831b1c06888d80d92a0bf34acbeecda026 (diff) |
Apply patch by Alan Coopersmith from #1605 to fix address resolution of
hostnames starting with a digit for 64 bit architechtures.
Diffstat (limited to 'Xtranssock.c')
-rw-r--r-- | Xtranssock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Xtranssock.c b/Xtranssock.c index 25b35eb..18d0a10 100644 --- a/Xtranssock.c +++ b/Xtranssock.c @@ -1613,12 +1613,12 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr, char *host, char *port) if (isascii (host[0]) && isdigit (host[0])) { tmpaddr = inet_addr (host); /* returns network byte order */ } else { - tmpaddr = -1; + tmpaddr = INADDR_NONE; } PRMSG (4,"SocketINETConnect() inet_addr(%s) = %x\n", host, tmpaddr, 0); - if ((long)tmpaddr == -1L) { + if (tmpaddr == INADDR_NONE) { if ((hostp = _XGethostbyname(host,hparams)) == NULL) { PRMSG (1,"SocketINETConnect: Can't get address for %s\n", host, 0, 0); |