Commit b17bc22b authored by Andrew Tridgell's avatar Andrew Tridgell

added a replacement inet_aton() for systems that don't have it.

thanks to Dave for pointing this out.
parent 3adffb52
......@@ -53,7 +53,7 @@ AC_FUNC_UTIME_NULL
AC_CHECK_FUNCS(waitpid wait4 getcwd strdup strerror chown chmod mknod)
AC_CHECK_FUNCS(fchmod fstat strchr readlink link utime utimes strftime)
AC_CHECK_FUNCS(memmove lchown vsnprintf snprintf setsid glob strpbrk)
AC_CHECK_FUNCS(strlcat strlcpy)
AC_CHECK_FUNCS(strlcat strlcpy inet_aton)
AC_CACHE_CHECK([for working fnmatch],rsync_cv_HAVE_FNMATCH,[
AC_TRY_RUN([#include <fnmatch.h>
......
......@@ -145,3 +145,19 @@
return ret;
}
#endif
#ifndef HAVE_INET_ATON
int inet_aton(const char *cp, struct in_addr *inp)
{
if (strcmp(cp, "255.255.255.255") == 0) {
inp->s_addr = (unsigned) -1;
return 1;
}
inp->s_addr = inet_addr(cp);
if (inp->s_addr == (unsigned) -1) {
return 0;
}
return 1;
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment