diff options
author | qiukeren <qiukeren@gmail.com> | 2015-12-21 20:52:40 +0800 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-12-29 23:03:30 +0100 |
commit | 848b050a567e360e857577c50dee82494b14973b (patch) | |
tree | a75162e8e69075012ea3cdce923135ab23bcc24c /src/util | |
parent | 1735c20549d474a45f1f231ea7d25ff8e3157818 (diff) | |
download | minetest-848b050a567e360e857577c50dee82494b14973b.tar.gz minetest-848b050a567e360e857577c50dee82494b14973b.tar.bz2 minetest-848b050a567e360e857577c50dee82494b14973b.zip |
Add macos/freebsd missing endian.h include and add win endianness info
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/serialize.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/util/serialize.h b/src/util/serialize.h index 58e59df22..36324a675 100644 --- a/src/util/serialize.h +++ b/src/util/serialize.h @@ -26,7 +26,17 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "config.h" #if HAVE_ENDIAN_H - #include <endian.h> + #ifdef _WIN32 + #define __BYTE_ORDER 0 + #define __LITTLE_ENDIAN 0 + #define __BIG_ENDIAN 1 + #elif defined(__MACH__) && defined(__APPLE__) + #include <machine/endian.h> + #elif defined(__FreeBSD__) + #include <sys/endian.h> + #else + #include <endian.h> + #endif #endif #include <string.h> // for memcpy #include <iostream> |