From 848b050a567e360e857577c50dee82494b14973b Mon Sep 17 00:00:00 2001
From: qiukeren <qiukeren@gmail.com>
Date: Mon, 21 Dec 2015 20:52:40 +0800
Subject: [PATCH] Add macos/freebsd missing endian.h include and add win
 endianness info

---
 src/util/serialize.h | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

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>
-- 
GitLab