wok rev 23425

fusecloop: arch fix
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Apr 01 11:42:26 2020 +0200 (2020-04-01)
parents 7a3de9a33cba
children bcea19bfa7af
files fusecloop/receipt fusecloop/stuff/fusecloop.u
line diff
     1.1 --- a/fusecloop/receipt	Wed Apr 01 08:55:35 2020 +0100
     1.2 +++ b/fusecloop/receipt	Wed Apr 01 11:42:26 2020 +0200
     1.3 @@ -31,6 +31,8 @@
     1.4  	cp create_compressed_fs.c $ADVANCECOMP/redef.cc
     1.5  	sed -i 's/Z_BEST_COMPRESSION/Z_BEST_SPEED/' create_compressed_fs.c
     1.6  	sed -i 's/def FIND_BEST_COMPRESSION/ 1/' $ADVANCECOMP/redef.cc
     1.7 +	sed -i 's|\( -lz\)\(.*\)$|\2\1|' Makefile
     1.8 +	sed -i 's|\( \$.FUSELDFLAGS.\)\(.*\)$|\2\1|' Makefile
     1.9  	./configure --prefix=/usr --infodir=/usr/share/info \
    1.10  	--mandir=/usr/share/man $CONFIGURE_ARGS &&
    1.11  	make &&
     2.1 --- a/fusecloop/stuff/fusecloop.u	Wed Apr 01 08:55:35 2020 +0100
     2.2 +++ b/fusecloop/stuff/fusecloop.u	Wed Apr 01 11:42:26 2020 +0200
     2.3 @@ -620,7 +620,7 @@
     2.4  +}
     2.5  --- create_compressed_fs.c
     2.6  +++ create_compressed_fs.c
     2.7 -@@ -0,0 +1,225 @@
     2.8 +@@ -0,0 +1,226 @@
     2.9  +#ifdef FIND_BEST_COMPRESSION
    2.10  +#include <compress.h>
    2.11  +extern "C" {
    2.12 @@ -710,7 +710,8 @@
    2.13  +#endif
    2.14  +
    2.15  +static unsigned n;
    2.16 -+static unsigned long lastlen, pos, *block_index;
    2.17 ++static unsigned long lastlen, pos;
    2.18 ++static u_int32_t *block_index;
    2.19  +static unsigned char *compressed;
    2.20  +static unsigned long block_size = 0;
    2.21  +static void flush_index(int sig)
    2.22 @@ -785,7 +786,7 @@
    2.23  +	
    2.24  +	compressed = (unsigned char *) malloc(zlenmax);
    2.25  +	uncompressed = (unsigned char *) malloc(block_size);
    2.26 -+	block_index = (unsigned long *) malloc(indexmax = CHUNK);
    2.27 ++	block_index = (u_int32_t *) malloc(indexmax = CHUNK);
    2.28  +#ifdef FIND_BEST_COMPRESSION
    2.29  +	hash = (md5hash *) malloc(hashmax = CHUNK);
    2.30  +	if (!compressed || !uncompressed || !block_index || !hash)
    2.31 @@ -801,7 +802,7 @@
    2.32  +	for (n = 0; (len = readblock(uncompressed, block_size)) != 0; n++) {
    2.33  +		lastlen = len;
    2.34  +		if (n * sizeof(*block_index) >= indexmax) {
    2.35 -+			block_index = (unsigned long *) realloc(block_index,
    2.36 ++			block_index = (u_int32_t *) realloc(block_index,
    2.37  +							  indexmax += CHUNK);
    2.38  +			if (!block_index)
    2.39  +				quit("Realloc");