diff mbox series

[OpenWrt-Devel] tools/squashfs: fix compilation with GCC10

Message ID 20200503222031.395337-1-rosenp@gmail.com
State Superseded
Headers show
Series [OpenWrt-Devel] tools/squashfs: fix compilation with GCC10 | expand

Commit Message

Rosen Penev May 3, 2020, 10:20 p.m. UTC
On Fedora 32, it's not compiling because of multiple swap definitions.
Some inlining error probably. Make swap static to avoid a redefinition
error.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 tools/squashfs/patches/140-swap.patch | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 tools/squashfs/patches/140-swap.patch
diff mbox series

Patch

diff --git a/tools/squashfs/patches/140-swap.patch b/tools/squashfs/patches/140-swap.patch
new file mode 100644
index 0000000000..33f960bbde
--- /dev/null
+++ b/tools/squashfs/patches/140-swap.patch
@@ -0,0 +1,14 @@ 
+diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
+index e773f53..674333c 100644
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -88,7 +88,8 @@ int fd;
+ /* filesystem flags for building */
+ int duplicate_checking = 1, noF = 0, no_fragments = 0, always_use_fragments = 0;
+ int noI = 0, noD = 0, check_data = 0;
+-int swap, silent = TRUE;
++static int swap;
++int silent = TRUE;
+ long long global_uid = -1, global_gid = -1;
+ 
+ /* superblock attributes */