summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/squashfs/gcc-10.patch13
-rw-r--r--var/spack/repos/builtin/packages/squashfs/package.py5
2 files changed, 18 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/squashfs/gcc-10.patch b/var/spack/repos/builtin/packages/squashfs/gcc-10.patch
new file mode 100644
index 0000000000..e7f4a721c7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/squashfs/gcc-10.patch
@@ -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;
diff --git a/var/spack/repos/builtin/packages/squashfs/package.py b/var/spack/repos/builtin/packages/squashfs/package.py
index 55d3b0db7b..cd7b7b4358 100644
--- a/var/spack/repos/builtin/packages/squashfs/package.py
+++ b/var/spack/repos/builtin/packages/squashfs/package.py
@@ -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