Current location

narf Source control manager Git

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorosas <osas@1f1dca69-5516-0410-b834-e485effd04c3>2014-10-03 15:06:03 +0000
committerosas <osas@1f1dca69-5516-0410-b834-e485effd04c3>2014-10-03 15:06:03 +0000
commit74d5fdfa9b97fcdff134882ee611e10f44a00e7a (patch)
tree33a0aced2c77812e7dc9c01b35490f0fa49db1ee
parent031b98f0e5def75fe4b3ea5fe527cdcc5335d047 (diff)
librsync: fix for librsync 4GB bug (provided by andy@andyfreeland.net)HEADmaster
git-svn-id: http://svn.nslu2-linux.org/svnroot/optware/trunk@13128 1f1dca69-5516-0410-b834-e485effd04c3
-rw-r--r--make/librsync.mk8
-rw-r--r--sources/librsync/4gb.patch31
2 files changed, 35 insertions, 4 deletions
diff --git a/make/librsync.mk b/make/librsync.mk
index 6fc71f12..7647d1b0 100644
--- a/make/librsync.mk
+++ b/make/librsync.mk
@@ -20,7 +20,7 @@
# You should change all these variables to suit your package.
# Please make sure that you add a description, and that you
# list all your packages' dependencies, seperated by commas.
-#
+#
# If you list yourself as MAINTAINER, please give a valid email
# address, and indicate your irc nick if it cannot be easily deduced
# from your name or email address. If you leave MAINTAINER set to
@@ -42,7 +42,7 @@ LIBRSYNC_CONFLICTS=
#
# LIBRSYNC_IPK_VERSION should be incremented when the ipk changes.
#
-LIBRSYNC_IPK_VERSION=1
+LIBRSYNC_IPK_VERSION=2
#
# LIBRSYNC_CONFFILES should be a list of user-editable files
@@ -52,7 +52,7 @@ LIBRSYNC_IPK_VERSION=1
# LIBRSYNC_PATCHES should list any patches, in the the order in
# which they should be applied to the source code.
#
-#LIBRSYNC_PATCHES=$(LIBRSYNC_SOURCE_DIR)/configure.patch
+LIBRSYNC_PATCHES=$(LIBRSYNC_SOURCE_DIR)/4gb.patch
#
# If the compilation of the package requires additional
@@ -113,7 +113,7 @@ $(LIBRSYNC_BUILD_DIR)/.configured: $(DL_DIR)/$(LIBRSYNC_SOURCE) $(LIBRSYNC_PATCH
$(LIBRSYNC_UNZIP) $(DL_DIR)/$(LIBRSYNC_SOURCE) | tar -C $(BUILD_DIR) -xvf -
if test -n "$(LIBRSYNC_PATCHES)" ; \
then cat $(LIBRSYNC_PATCHES) | \
- patch -d $(BUILD_DIR)/$(LIBRSYNC_DIR) -p0 ; \
+ patch -d $(BUILD_DIR)/$(LIBRSYNC_DIR) -p1 ; \
fi
if test "$(BUILD_DIR)/$(LIBRSYNC_DIR)" != "$(LIBRSYNC_BUILD_DIR)" ; \
then mv $(BUILD_DIR)/$(LIBRSYNC_DIR) $(LIBRSYNC_BUILD_DIR) ; \
diff --git a/sources/librsync/4gb.patch b/sources/librsync/4gb.patch
new file mode 100644
index 00000000..fef08941
--- /dev/null
+++ b/sources/librsync/4gb.patch
@@ -0,0 +1,31 @@
+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;