aboutsummaryrefslogtreecommitdiffstats
path: root/tools/squashfs/patches/140-gcc-10-fix.patch
blob: a02641f3072c42c6d49b1d1d3102c7d66d83567a (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
Fixes the following build error with GCC 10:
	/usr/bin/ld: read_fs.o:(.bss+0x0): multiple definition of `swap'; mksquashfs.o:(.bss+0x1b2a88): first defined here
And a compile warning.

--- a/squashfs-tools/read_fs.c
+++ b/squashfs-tools/read_fs.c
@@ -61,7 +61,7 @@ extern int add_file(long long, long long
 						fprintf(stderr, s, ## args); \
 					} while(0)
 
-int swap;
+static int swap;
 
 int read_block(int fd, long long start, long long *next, unsigned char *block, squashfs_super_block *sBlk)
 {
--- a/squashfs-tools/mksquashfs.c
+++ b/squashfs-tools/mksquashfs.c
@@ -258,6 +258,7 @@ int read_sort_file(char *filename, int s
 void sort_files_and_write(struct dir_info *dir);
 struct file_info *duplicate(char *(get_next_file_block)(struct duplicate_buffer_handle *, unsigned int), struct duplicate_buffer_handle *file_start, long long bytes, unsigned int **block_list, long long *start, int blocks, struct fragment **fragment, char *frag_data, int frag_bytes);
 struct dir_info *dir_scan1(char *, int (_readdir)(char *, char *, struct dir_info *));
+int dir_scan2(squashfs_inode *inode, struct dir_info *dir_info);
 
 #define MKINODE(A)	((squashfs_inode)(((squashfs_inode) inode_bytes << 16) + (((char *)A) - data_cache)))