summaryrefslogtreecommitdiffstats
path: root/package/squashfs/squashfs-4.2-no-gzip-fix.patch
blob: 4cb5f50cb5913d67e7ffe2466ddb19a9f6398c30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[PATCH] squashfs-tools: unbreak builds without gzip support

The initialization of gzip_comp_ops if gzip support is disabled is
missing 2 null pointers, causing the id element to be initialized to 0
rather than ZLIB_COMPRESSION, which breaks all the compressor functions
as they loop until finding the correct element or id = 0.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 squashfs-tools/compressor.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: squashfs4.2/squashfs-tools/compressor.c
===================================================================
--- squashfs4.2.orig/squashfs-tools/compressor.c
+++ squashfs4.2/squashfs-tools/compressor.c
@@ -27,7 +27,8 @@
 
 #ifndef GZIP_SUPPORT
 static struct compressor gzip_comp_ops =  {
-	NULL, NULL, NULL, NULL, NULL, NULL, ZLIB_COMPRESSION, "gzip", 0
+	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ZLIB_COMPRESSION,
+	"gzip", 0
 };
 #else
 extern struct compressor gzip_comp_ops;