summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-09-04 15:12:40 +0100
committerVincent Sanders <vince@kyllikki.org>2016-09-04 15:12:40 +0100
commitbce2c233988e86ad034f6e0c8b96385db0d47a2e (patch)
tree9366a3cf13f21eddc753f03a67abee51a7c788da
parent6fe884b805a97e4185703afb62de4da8bdf3edde (diff)
downloadlibnsfb-bce2c233988e86ad034f6e0c8b96385db0d47a2e.tar.gz
libnsfb-bce2c233988e86ad034f6e0c8b96385db0d47a2e.tar.bz2
cope with mac os X having the endian header somewhere else
-rw-r--r--src/plot.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plot.h b/src/plot.h
index 6e67ca6..65ef264 100644
--- a/src/plot.h
+++ b/src/plot.h
@@ -29,7 +29,13 @@
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define NSFB_BE_BYTE_ORDER
#endif
-#else /* defined(_WIN32) */
+#elif defined(OS_MACOSX)
+/* mac os x has the include somewhere different */
+ #include <machine/endian.h>
+ #if BYTE_ORDER == BIG_ENDIAN
+ #define NSFB_BE_BYTE_ORDER
+ #endif
+#else
#include <endian.h>
#if defined(__BYTE_ORDER__)
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__