about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Src/Modules/zftp.c16
-rw-r--r--configure.in2
2 files changed, 17 insertions, 1 deletions
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
@@ -126,6 +126,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 ---------------