Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 110253 - squashfs-tools works with small patch
Summary: squashfs-tools works with small patch
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Mac OSX (show other bugs)
Hardware: PPC OS X
: High normal (vote)
Assignee: Gentoo for Mac OS X
URL: http://openwrt.org/forum/viewtopic.ph...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-23 11:58 UTC by Decade
Modified: 2006-06-03 04:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Decade 2005-10-23 11:58:30 UTC
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"
Comment 1 Decade 2005-10-23 12:01:16 UTC
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>
Comment 2 Fabian Groffen gentoo-dev 2005-10-23 12:04:51 UTC
Can you please attach a unified diff?  Thanks!
Comment 3 Decade 2006-06-03 04:42:16 UTC
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.