# HG changeset patch # User Pascal Bellard # Date 1585734146 -7200 # Node ID 550ebe21c230e04d88e0d0070091603276f1d85e # Parent 7a3de9a33cba1fd02c2375f082e0448588aef0cc fusecloop: arch fix diff -r 7a3de9a33cba -r 550ebe21c230 fusecloop/receipt --- a/fusecloop/receipt Wed Apr 01 08:55:35 2020 +0100 +++ b/fusecloop/receipt Wed Apr 01 11:42:26 2020 +0200 @@ -31,6 +31,8 @@ cp create_compressed_fs.c $ADVANCECOMP/redef.cc sed -i 's/Z_BEST_COMPRESSION/Z_BEST_SPEED/' create_compressed_fs.c sed -i 's/def FIND_BEST_COMPRESSION/ 1/' $ADVANCECOMP/redef.cc + sed -i 's|\( -lz\)\(.*\)$|\2\1|' Makefile + sed -i 's|\( \$.FUSELDFLAGS.\)\(.*\)$|\2\1|' Makefile ./configure --prefix=/usr --infodir=/usr/share/info \ --mandir=/usr/share/man $CONFIGURE_ARGS && make && diff -r 7a3de9a33cba -r 550ebe21c230 fusecloop/stuff/fusecloop.u --- a/fusecloop/stuff/fusecloop.u Wed Apr 01 08:55:35 2020 +0100 +++ b/fusecloop/stuff/fusecloop.u Wed Apr 01 11:42:26 2020 +0200 @@ -620,7 +620,7 @@ +} --- create_compressed_fs.c +++ create_compressed_fs.c -@@ -0,0 +1,225 @@ +@@ -0,0 +1,226 @@ +#ifdef FIND_BEST_COMPRESSION +#include +extern "C" { @@ -710,7 +710,8 @@ +#endif + +static unsigned n; -+static unsigned long lastlen, pos, *block_index; ++static unsigned long lastlen, pos; ++static u_int32_t *block_index; +static unsigned char *compressed; +static unsigned long block_size = 0; +static void flush_index(int sig) @@ -785,7 +786,7 @@ + + compressed = (unsigned char *) malloc(zlenmax); + uncompressed = (unsigned char *) malloc(block_size); -+ block_index = (unsigned long *) malloc(indexmax = CHUNK); ++ block_index = (u_int32_t *) malloc(indexmax = CHUNK); +#ifdef FIND_BEST_COMPRESSION + hash = (md5hash *) malloc(hashmax = CHUNK); + if (!compressed || !uncompressed || !block_index || !hash) @@ -801,7 +802,7 @@ + for (n = 0; (len = readblock(uncompressed, block_size)) != 0; n++) { + lastlen = len; + if (n * sizeof(*block_index) >= indexmax) { -+ block_index = (unsigned long *) realloc(block_index, ++ block_index = (u_int32_t *) realloc(block_index, + indexmax += CHUNK); + if (!block_index) + quit("Realloc");