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

thanks to Dave for pointing this out.
This commit is contained in:
Andrew Tridgell committed 1999-11-01 21:35:15 +00:00
1 parent 3adffb52e6
commit b17bc22bb3
2 files changed
+17 -1

No files matched your search

+1 -1
View File
@@ -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>
+16
View File
@@ -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