tools/squashfs4: add new tool for squashfs4 images
[openwrt/staging/aparcar.git] / tools / squashfs4 / patches / 100-portability.patch
1 --- a/squashfs-tools/xattr.c
2 +++ b/squashfs-tools/xattr.c
3 @@ -115,6 +115,7 @@ int xattr_get_prefix(struct xattr_list *
4
5 static int read_xattrs_from_system(char *filename, struct xattr_list **xattrs)
6 {
7 +#if defined(linux)
8 ssize_t size, vsize;
9 char *xattr_names, *p;
10 int i;
11 @@ -227,6 +228,10 @@ failed:
12 free(xattr_list);
13 free(xattr_names);
14 return 0;
15 +#else
16 + *xattrs = NULL;
17 + return 0;
18 +#endif
19 }
20
21
22 --- a/squashfs-tools/unsquashfs_xattr.c
23 +++ b/squashfs-tools/unsquashfs_xattr.c
24 @@ -36,6 +36,7 @@ extern int strict_errors;
25
26 int write_xattr(char *pathname, unsigned int xattr)
27 {
28 +#if defined(linux)
29 unsigned int count;
30 struct xattr_list *xattr_list;
31 int i;
32 @@ -147,4 +148,5 @@ int write_xattr(char *pathname, unsigned
33 free_xattr(xattr_list, count);
34
35 return !failed;
36 +#endif
37 }