--- zlib/infcodes.c.orig	Tue Mar 12 02:14:58 2002
+++ zlib/infcodes.c	Sun Apr 21 21:19:46 2002
@@ -197,8 +197,18 @@
       c->mode = COPY;
     case COPY:          /* o: copying bytes in window, waiting for space */
       f = q - c->sub.copy.dist;
+#ifdef __FreeBSD__
+      {
+      /* Work-around for a FreeBSD gcc bug. */
+      volatile inflate_blocks_statef *s1 = s;
+
+      while (f < s1->window)            /* modulo window size-"while" instead */
+        f += s1->end - s1->window;      /* of "if" handles invalid distances */
+      }
+#else
       while (f < s->window)             /* modulo window size-"while" instead */
         f += s->end - s->window;        /* of "if" handles invalid distances */
+#endif
       while (c->len)
       {
         NEEDOUT
--- rsync.h.orig	Mon Mar 25 08:29:43 2002
+++ rsync.h	Tue Apr 23 13:49:06 2002
@@ -113,7 +113,7 @@
 #include <string.h>
 #endif
 
-#ifdef HAVE_MALLOC_H
+#if defined(HAVE_MALLINFO) && defined(HAVE_MALLOC_H)
 #include <malloc.h>
 #endif
 
@@ -181,10 +181,6 @@
 
 #ifdef HAVE_GLOB_H
 #include <glob.h>
-#endif
-
-#ifdef HAVE_MALLOC_H
-#  include <malloc.h>
 #endif
 
 /* these are needed for the uid/gid mapping code */
--- main.c.orig	Tue Sep  5 19:46:43 2000
+++ main.c	Sat Apr  7 23:32:25 2001
@@ -134 +134 @@
-			cmd = RSYNC_RSH;
+			cmd = RSYNC_SSH;
--- options.c.orig	Thu Mar  8 03:31:32 2001
+++ options.c	Thu Mar  8 03:31:32 2001
@@ -141 +141 @@
-  rprintf(F," -e, --rsh=COMMAND           specify rsh replacement\n");
+  rprintf(F," -e, --rsh=COMMAND           specify rsh replacement (default %s)\n", RSYNC_SSH);
--- rsync.h.orig	Sat Aug 19 06:10:39 2000
+++ rsync.h	Sat Apr  7 23:31:00 2001
@@ -75,4 +75,5 @@
 #define RSYNC_RSH "rsh"
 #endif
+#define RSYNC_SSH "ssh"
 
 #include <sys/types.h>
