From fcc061412bdf8b0d9fb2f24b292a41f85f25d995 Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 8 Aug 2009 14:12:27 +0000 Subject: [PATCH] [package] add 4GB file handling patch to librsync (#5642) git-svn-id: svn://svn.openwrt.org/openwrt/packages@17180 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- libs/librsync/Makefile | 4 +-- libs/librsync/patches/001-4gb_files.patch | 31 +++++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 libs/librsync/patches/001-4gb_files.patch diff --git a/libs/librsync/Makefile b/libs/librsync/Makefile index d340018e5..62b886bbb 100644 --- a/libs/librsync/Makefile +++ b/libs/librsync/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=librsync PKG_VERSION:=0.9.7 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/librsync diff --git a/libs/librsync/patches/001-4gb_files.patch b/libs/librsync/patches/001-4gb_files.patch new file mode 100644 index 000000000..3c0128e28 --- /dev/null +++ b/libs/librsync/patches/001-4gb_files.patch @@ -0,0 +1,31 @@ +diff -urN librsync-0.9.7/mdfour.h librsync-0.9.7.new/mdfour.h +--- librsync-0.9.7/mdfour.h 2004-02-08 00:17:57.000000000 +0100 ++++ librsync-0.9.7.new/mdfour.h 2009-08-08 16:08:57.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 -urN librsync-0.9.7/patch.c librsync-0.9.7.new/patch.c +--- librsync-0.9.7/patch.c 2004-09-17 23:35:50.000000000 +0200 ++++ librsync-0.9.7.new/patch.c 2009-08-08 16:10:40.000000000 +0200 +@@ -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;