diff options
author | Thomas Klausner <tk@giga.or.at> | 2014-08-23 14:27:44 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-23 14:27:44 +0200 |
commit | c38f29ce561a5c79a82c1c60c34ef88b5ded0660 (patch) | |
tree | 6760942dab799caa4b59f79dad79011441f18578 | |
parent | 78abcd7df7ad967c44c884773cc7d39cf3c811a9 (diff) | |
download | mpd-c38f29ce561a5c79a82c1c60c34ef88b5ded0660.tar.gz mpd-c38f29ce561a5c79a82c1c60c34ef88b5ded0660.tar.xz mpd-c38f29ce561a5c79a82c1c60c34ef88b5ded0660.zip |
system/ByteOrder: <endian.h> is a non-standard header that only Linux provides.
Diffstat (limited to '')
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/system/ByteOrder.hxx | 10 |
2 files changed, 11 insertions, 0 deletions
@@ -2,6 +2,7 @@ ver 0.18.13 (not yet released) * decoder - dsdiff, dsf: fix endless loop on malformed file - ffmpeg: support ffmpeg/libav version 11 +* fix build failure on Darwin ver 0.18.12 (2014/07/30) * database diff --git a/src/system/ByteOrder.hxx b/src/system/ByteOrder.hxx index 8beda61c7..42181fe2c 100644 --- a/src/system/ByteOrder.hxx +++ b/src/system/ByteOrder.hxx @@ -40,6 +40,16 @@ /* well-known big-endian */ # define IS_LITTLE_ENDIAN false # define IS_BIG_ENDIAN true +#elif defined(__APPLE__) +/* compile-time check for MacOS */ +# include <machine/endian.h> +# if BYTE_ORDER == LITTLE_ENDIAN +# define IS_LITTLE_ENDIAN true +# define IS_BIG_ENDIAN false +# else +# define IS_LITTLE_ENDIAN false +# define IS_BIG_ENDIAN true +# endif #else /* generic compile-time check */ # include <endian.h> |