From 5a75658a137590fca3b26ee6934956c0dcc95d42 Mon Sep 17 00:00:00 2001 From: qiukeren Date: Tue, 22 Dec 2015 01:45:50 +0800 Subject: [PATCH] add windows endian compatibility --- src/util/serialize.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/util/serialize.h b/src/util/serialize.h index 2b3624963..36324a675 100644 --- a/src/util/serialize.h +++ b/src/util/serialize.h @@ -26,7 +26,11 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "config.h" #if HAVE_ENDIAN_H - #if defined(__MACH__) && defined(__APPLE__) + #ifdef _WIN32 + #define __BYTE_ORDER 0 + #define __LITTLE_ENDIAN 0 + #define __BIG_ENDIAN 1 + #elif defined(__MACH__) && defined(__APPLE__) #include #elif defined(__FreeBSD__) #include