squashfs: fix build with GCC 10 (#20592)

This commit is contained in:
John Wohlbier 2020-12-29 02:46:00 -05:00 committed by GitHub
parent e62676b245
commit 76d23d9ee4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff --git a/squashfs-tools/mksquashfs.h b/squashfs-tools/mksquashfs.h
index 1beefef7..b6503063 100644
--- a/squashfs-tools/mksquashfs.h
+++ b/squashfs-tools/mksquashfs.h
@@ -143,7 +143,7 @@ struct append_file {
#endif
extern struct cache *reader_buffer, *fragment_buffer, *reserve_cache;
-struct cache *bwriter_buffer, *fwriter_buffer;
+extern struct cache *bwriter_buffer, *fwriter_buffer;
extern struct queue *to_reader, *to_deflate, *to_writer, *from_writer,
*to_frag, *locked_fragment, *to_process_frag;
extern struct append_file **file_mapping;

View File

@ -44,6 +44,11 @@ class Squashfs(MakefilePackage):
depends_on('xz', when='+xz')
depends_on('zstd', when='+zstd')
# patch from
# https://github.com/plougher/squashfs-tools/commit/fe2f5da4b0f8994169c53e84b7cb8a0feefc97b5.patch
patch('gcc-10.patch', when="%gcc@10:")
patch('gcc-10.patch', when="%clang@11:")
def build(self, spec, prefix):
with working_dir('squashfs-tools'):
default = spec.variants['default_compression'].value