yodl2man -o rsyncd.conf.5 rsyncd.conf.yo
proto:
- cat *.c | awk -f mkproto.awk > proto.h
+ cat *.c lib/compat.c | awk -f mkproto.awk > proto.h
clean:
rm -f *~ $(OBJS) rsync
#undef HAVE_SHORT_INO_T
#undef HAVE_GETOPT_LONG
#undef REPLACE_INET_NTOA
+#undef HAVE_GETTIMEOFDAY_TZ
memset(input, 0, sizeof(input));
strlcpy((char *)input, addr, 17);
- gettimeofday(&tv, NULL);
+ sys_gettimeofday(&tv);
SIVAL(input, 16, tv.tv_sec);
SIVAL(input, 20, tv.tv_usec);
SIVAL(input, 24, getpid());
AC_DEFINE(HAVE_UTIMBUF)
fi
+AC_CACHE_CHECK([if gettimeofday takes tz argument],rsync_cv_HAVE_GETTIMEOFDAY_TZ,[
+AC_TRY_RUN([
+#include <sys/time.h>
+#include <unistd.h>
+main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}],
+ rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes,rsync_cv_HAVE_GETTIMEOFDAY_TZ=no,rsync_cv_HAVE_GETTIMEOFDAY_TZ=cross)])
+if test x"$rsync_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
+ AC_DEFINE(HAVE_GETTIMEOFDAY_TZ)
+fi
+
+
AC_CACHE_CHECK([for broken inet_ntoa],rsync_cv_REPLACE_INET_NTOA,[
AC_TRY_RUN([
#include <stdio.h>
return 1;
}
#endif
+
+/* some systems don't take the 2nd argument */
+int sys_gettimeofday(struct timeval *tv)
+{
+#if HAVE_GETTIMEOFDAY_TZ
+ return gettimeofday(tv, NULL);
+#else
+ return gettimeofday(tv);
+#endif
+}