diff options
author | Christian Marangi <ansuelsmth@gmail.com> | 2023-02-06 23:22:43 +0100 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2023-02-20 07:34:03 +0100 |
commit | 30f2d516ba7be08f06f7ca8767472c3ea5678706 (patch) | |
tree | 6a76fef0e685764abd5f3ed2df2ebcce7856b219 /tools/squashfs4/patches/100-portability.patch | |
parent | 57db2280a2155c39f545ac712766a849cf45f62c (diff) | |
download | upstream-30f2d516ba7be08f06f7ca8767472c3ea5678706.tar.gz upstream-30f2d516ba7be08f06f7ca8767472c3ea5678706.tar.bz2 upstream-30f2d516ba7be08f06f7ca8767472c3ea5678706.zip |
tools/squashfs4: add new tool for squashfs4 images
squashfs tool is finally reborn and correctly maintained.
Introduce the new version as a replacement for squasfs4kit as it was a
fork and also abandoned.
Add additional patch to add the missing feature present in squashfskit4
but still missing on this new project.
Backport each required patch that fix compilation error on macos.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'tools/squashfs4/patches/100-portability.patch')
-rw-r--r-- | tools/squashfs4/patches/100-portability.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tools/squashfs4/patches/100-portability.patch b/tools/squashfs4/patches/100-portability.patch new file mode 100644 index 0000000000..fe804d4476 --- /dev/null +++ b/tools/squashfs4/patches/100-portability.patch @@ -0,0 +1,37 @@ +--- a/squashfs-tools/xattr.c ++++ b/squashfs-tools/xattr.c +@@ -115,6 +115,7 @@ int xattr_get_prefix(struct xattr_list * + + static int read_xattrs_from_system(char *filename, struct xattr_list **xattrs) + { ++#if defined(linux) + ssize_t size, vsize; + char *xattr_names, *p; + int i; +@@ -227,6 +228,10 @@ failed: + free(xattr_list); + free(xattr_names); + return 0; ++#else ++ *xattrs = NULL; ++ return 0; ++#endif + } + + +--- a/squashfs-tools/unsquashfs_xattr.c ++++ b/squashfs-tools/unsquashfs_xattr.c +@@ -36,6 +36,7 @@ extern int strict_errors; + + int write_xattr(char *pathname, unsigned int xattr) + { ++#if defined(linux) + unsigned int count; + struct xattr_list *xattr_list; + int i; +@@ -147,4 +148,5 @@ int write_xattr(char *pathname, unsigned + free_xattr(xattr_list, count); + + return !failed; ++#endif + } |