Description: Basic support for MacOS X
Author: Tim Wilson-Brown <twilsonb@mac.com>
Bug-Debian: http://bugs.debian.org/370204

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- cloop-2.6.39.2.orig/extract_compressed_fs.c
+++ cloop-2.6.39.2/extract_compressed_fs.c
@@ -10,14 +10,22 @@
 #include <stdlib.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+
+/*Mac OS X does not have endian.h*/
+#if defined(__APPLE__)
+#include <architecture/byte_order.h>
+#else
 #include <endian.h>
+#endif
+
 #include <errno.h>
 #include <string.h>
 #include <zlib.h>
 #include <netinet/in.h>
 #include <inttypes.h>
 
-#ifdef __CYGWIN__
+/*Mac OS X does not have loff_t*/
+#if defined(__CYGWIN__) || defined(__APPLE__)
 typedef uint64_t loff_t;
 #endif
 #ifndef be64toh
