You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.8 KiB
52 lines
1.8 KiB
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# Filename: package/.../librsync/02-4gb.patch |
|
# Copyright (C) 2011 The OpenSDE Project |
|
# |
|
# More information can be found in the files COPYING and README. |
|
# |
|
# This patch file is dual-licensed. It is available under the license the |
|
# patched project is licensed under, as long as it is an OpenSource license |
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms |
|
# of the GNU General Public License as published by the Free Software |
|
# Foundation; either version 2 of the License, or (at your option) any later |
|
# version. |
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
Author: n/a |
|
Description: |
|
Fixes problem when transfering >4GB from a 32bit to 64bit host |
|
(Closes: #355178). |
|
|
|
diff -Naurp librsync.orig/mdfour.h librsync/mdfour.h |
|
--- librsync.orig/mdfour.h 2008-06-21 14:50:55.000000000 +0200 |
|
+++ librsync/mdfour.h 2008-06-24 10:26:49.000000000 +0200 |
|
@@ -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 -Naurp librsync.orig/patch.c librsync/patch.c |
|
--- librsync.orig/patch.c 2008-06-21 14:50:55.000000000 +0200 |
|
+++ librsync/patch.c 2008-06-24 10:26:49.000000000 +0200 |
|
@@ -214,12 +214,12 @@ static rs_result rs_patch_s_copying(rs_j |
|
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;
|
|
|