The thing keeping squashfs-tools from working is a small issue over where to find endian.h I'm not sure if I'm making this patch correctly, and I haven't tested whether the generated squashfs files work correctly. I also don't know what's the point of defining __BYTE_ORDER and __BIG_ENDIAN If the patch works, it should have no effect on Linux or BSD systems. Reproducible: Always Steps to Reproduce: *** squashfs-tools-2.2_p2/work/squashfs2.2-r2/squashfs-tools/read_fs.c Wed Sep 7 16:00:39 2005 --- squashfs-tools-2.2_p2-edit/work/squashfs2.2-r2/squashfs-tools/read_fs.c Sun Oct 23 11:13:08 2005 *************** *** 34,40 **** #include <string.h> #include <zlib.h> #include <sys/mman.h> ! #include <endian.h> #include <squashfs_fs.h> #include "read_fs.h" --- 34,46 ---- #include <string.h> #include <zlib.h> #include <sys/mman.h> ! #ifdef __APPLE__ ! #include <machine/endian.h> ! #define __BYTE_ORDER BYTE_ORDER ! #define __BIG_ENDIAN BIG_ENDIAN ! #else ! #include <endian.h> ! #endif #include <squashfs_fs.h> #include "read_fs.h"
Hm. Interesting problem with the copying and pasting there... *** squashfs-tools-2.2_p2/work/squashfs2.2-r2/squashfs-tools/mksquashfs.c Thu Sep 8 15:34:28 2005 --- squashfs-tools-2.2_p2-edit/work/squashfs2.2-r2/squashfs-tools/mksquashfs.c Sun Oct 23 11:01:19 2005 *************** *** 34,40 **** #include <dirent.h> #include <string.h> #include <zlib.h> ! #include <endian.h> #include <stdlib.h> #include <signal.h> #include <setjmp.h> --- 34,46 ---- #include <dirent.h> #include <string.h> #include <zlib.h> ! #ifdef __APPLE__ ! #include <machine/endian.h> ! #define __BYTE_ORDER BYTE_ORDER ! #define __BIG_ENDIAN BIG_ENDIAN ! #else ! #include <endian.h> ! #endif #include <stdlib.h> #include <signal.h> #include <setjmp.h>
Can you please attach a unified diff? Thanks!
I'm not sure what that is. I was hoping that whatever I was writing would make it obvious to an actual developer. Oh, yes, that patch was inspired by what someone else put in a forum somewhere. I forgot to credit him/her, and it was a while ago. Anyway, SquashFS 3 is out now, and it doesn't have this problem, and it eliminates some filesystem limits at the expense of slightly higher space overhead (~1/3 of 1% bigger file on a compiled Linux 2.6.16 tree). And at the expense of squashfs-tools not being backwards-compatible yet with SquashFS 2.x filesystems.