diff -urN librsync-0.9.7/mdfour.h librsync-0.9.7dev/mdfour.h --- librsync-0.9.7/mdfour.h 2004-02-07 18:17:57.000000000 -0500 +++ librsync-0.9.7dev/mdfour.h 2006-03-06 03:21:46.000000000 -0500 @@ -24,7 +24,7 @@ #include "types.h" struct rs_mdfour { - int A, B, C, D; + unsigned int A, B, C, D; #if HAVE_UINT64 uint64_t totalN; #else diff -urN librsync-0.9.7/patch.c librsync-0.9.7dev/patch.c --- librsync-0.9.7/patch.c 2004-09-17 17:35:50.000000000 -0400 +++ librsync-0.9.7dev/patch.c 2006-03-06 03:21:06.000000000 -0500 @@ -214,12 +214,12 @@ void *buf, *ptr; rs_buffers_t *buffs = job->stream; - len = job->basis_len; - /* copy only as much as will fit in the output buffer, so that we * don't have to block or store the input. */ - if (len > buffs->avail_out) + if (job->basis_len > buffs->avail_out) len = buffs->avail_out; + else + len = job->basis_len; if (!len) return RS_BLOCKED; --- librsync-0.9.7/delta.c.orig 2012-03-17 10:59:31.000000000 -0400 +++ librsync-0.9.7/delta.c 2012-03-17 10:59:51.000000000 -0400 @@ -126,10 +126,10 @@ static rs_result rs_delta_s_end(rs_job_t *job); void rs_getinput(rs_job_t *job); inline int rs_findmatch(rs_job_t *job, rs_long_t *match_pos, size_t *match_len); -inline rs_result rs_appendmatch(rs_job_t *job, rs_long_t match_pos, size_t match_len); -inline rs_result rs_appendmiss(rs_job_t *job, size_t miss_len); -inline rs_result rs_appendflush(rs_job_t *job); -inline rs_result rs_processmatch(rs_job_t *job); +static inline rs_result rs_appendmatch(rs_job_t *job, rs_long_t match_pos, size_t match_len); +static inline rs_result rs_appendmiss(rs_job_t *job, size_t miss_len); +static inline rs_result rs_appendflush(rs_job_t *job); +static inline rs_result rs_processmatch(rs_job_t *job); inline rs_result rs_processmiss(rs_job_t *job); /**