From 7d21f9ad5bd972fdd27b21b93c251ad0ac0e8d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Groenvall?= Date: Mon, 6 May 1996 14:42:50 +0000 Subject: [PATCH] Use inet_addr for portability reasons. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@510 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/ftp/ftp/ftp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/appl/ftp/ftp/ftp.c b/appl/ftp/ftp/ftp.c index 354b73096..f15bf4426 100644 --- a/appl/ftp/ftp/ftp.c +++ b/appl/ftp/ftp/ftp.c @@ -35,6 +35,10 @@ #include "ftp_locl.h" +#ifndef INADDR_NONE +#define INADDR_NONE 0xffffffff +#endif + struct sockaddr_in hisctladdr; struct sockaddr_in data_addr; int data = -1; @@ -58,7 +62,8 @@ hookup(char *host, int port) static char hostnamebuf[80]; memset((char *)&hisctladdr, 0, sizeof (hisctladdr)); - if (inet_aton(host, &hisctladdr.sin_addr) != 0) { + hisctladdr.sin_addr.s_addr = inet_addr(host); + if (hisctladdr.sin_addr.s_addr != INADDR_NONE) { hisctladdr.sin_family = AF_INET; (void) strncpy(hostnamebuf, host, sizeof(hostnamebuf)); } else {