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

Rosen Penev rosenp at gmail.com
Sun May 3 18:20:31 EDT 2020


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 at gmail.com>
---
 tools/squashfs/patches/140-swap.patch | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 tools/squashfs/patches/140-swap.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 */
-- 
2.26.2


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list