From b30915b56a5c678665a106dc6718dce11b1959ac Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Tue, 30 Nov 1999 18:16:49 +0000 Subject: zsh-workers/8826 --- Src/Modules/zftp.c | 16 ++++++++++++++++ configure.in | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c index b334c878a..c58731126 100644 --- a/Src/Modules/zftp.c +++ b/Src/Modules/zftp.c @@ -125,6 +125,22 @@ inet_ntop(int af, void const *cp, char *buf, size_t len) /**/ #ifndef HAVE_INET_PTON +/**/ +# ifndef HAVE_INET_ATON + +# ifndef INADDR_NONE +# define INADDR_NONE 0xffffffffUL +# endif + +/**/ +static int inet_aton(char const *src, struct in_addr *dst) +{ + return (dst->s_addr = inet_addr(src)) != INADDR_NONE; +} + +/**/ +# endif /* !HAVE_INET_ATON */ + /**/ static int inet_pton(int af, char const *src, void *dst) diff --git a/configure.in b/configure.in index 8d810e7a4..de8d06dc0 100644 --- a/configure.in +++ b/configure.in @@ -791,7 +791,7 @@ AC_CHECK_FUNCS(memcpy memmove \ sigprocmask setuid seteuid setreuid setresuid setsid strerror \ nis_list initgroups fchdir cap_get_proc readlink nice \ getgrgid getgrnam getpwent getpwnam getpwuid setpgrp \ - inet_pton inet_ntop getipnodebyname gethostbyname2 \ + inet_aton inet_pton inet_ntop getipnodebyname gethostbyname2 \ fseeko ftello mmap munmap msync ftruncate setlocale) dnl --------------- -- cgit 1.4.1