diff options
author | Rosen Penev <rosenp@gmail.com> | 2021-06-19 21:31:35 -0500 |
---|---|---|
committer | Paul Spooren <mail@aparcar.org> | 2021-06-20 18:59:36 -1000 |
commit | 3cbdc13bc1367a6fdc9bc2afadfae21b74d7c781 (patch) | |
tree | 94c0a92c31d7d977fbfec9875ee36dab847cc9c6 /tools/squashfskit4/patches/0020-big-endian.patch | |
parent | b154a2f8d37097e51099ed816a0f8142120405e6 (diff) | |
download | upstream-3cbdc13bc1367a6fdc9bc2afadfae21b74d7c781.tar.gz upstream-3cbdc13bc1367a6fdc9bc2afadfae21b74d7c781.tar.bz2 upstream-3cbdc13bc1367a6fdc9bc2afadfae21b74d7c781.zip |
tools/squashfskit4: fix compilation under big endian
The macro used is for the wrong struct. Just byte swap manually.
Refreshed patches.
Tested on sparc64.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'tools/squashfskit4/patches/0020-big-endian.patch')
-rw-r--r-- | tools/squashfskit4/patches/0020-big-endian.patch | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/squashfskit4/patches/0020-big-endian.patch b/tools/squashfskit4/patches/0020-big-endian.patch new file mode 100644 index 0000000000..b388cb4d12 --- /dev/null +++ b/tools/squashfskit4/patches/0020-big-endian.patch @@ -0,0 +1,14 @@ +--- a/squashfs-tools/xz_wrapper.c ++++ b/squashfs-tools/xz_wrapper.c +@@ -192,7 +192,10 @@ static void xz_display_options(void *buf + if(size != sizeof(struct comp_opts)) + goto failed; + +- SQUASHFS_INSWAP_LZMA_COMP_OPTS(comp_opts); ++#if __BYTE_ORDER == __BIG_ENDIAN ++ comp_opts->dictionary_size = inswap_le32(comp_opts->dictionary_size); ++ comp_opts->flags = inswap_le32(comp_opts->flags); ++#endif + + dictionary_size = comp_opts->dictionary_size; + flags = comp_opts->flags; |