From fc17bd94e6022db986cb325c03407fc4bdf1280d Mon Sep 17 00:00:00 2001
Author: Kalle Huttunen <kalle.huttunen@ge.com>
Date: Fri, 22 Jan 2016 10:00:59 +0200
Description: Fix test compilation on ARM based platform
Origin: https://github.com/USCiLab/cereal/pull/257
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- libcereal.orig/CMakeLists.txt
+++ libcereal/CMakeLists.txt
@@ -10,7 +10,7 @@
 find_package(Boost COMPONENTS serialization unit_test_framework)
 
 if(Boost_FOUND)
-  include_directories(${Boost_INCLUDE_DIRS})
+  include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
   enable_testing()
   if(NOT ONLY_TEST)
     include_directories(./include)
--- libcereal.orig/include/cereal/archives/xml.hpp
+++ libcereal/include/cereal/archives/xml.hpp
@@ -525,6 +525,7 @@
       //! Loads a type best represented as an unsigned long from the current top node
       template <class T, traits::EnableIf<std::is_unsigned<T>::value,
                                           !std::is_same<T, bool>::value,
+                                          !std::is_same<T, char>::value,
                                           !std::is_same<T, unsigned char>::value,
                                           sizeof(T) < sizeof(long long)> = traits::sfinae> inline
       void loadValue( T & value )
--- libcereal.orig/include/cereal/archives/json.hpp
+++ libcereal/include/cereal/archives/json.hpp
@@ -641,14 +641,14 @@
       //! Serialize a long if it would not be caught otherwise
       template <class T> inline
       typename std::enable_if<std::is_same<T, long>::value &&
-                              !std::is_same<T, std::int32_t>::value &&
+                              sizeof(T) >= sizeof(std::int64_t) &&
                               !std::is_same<T, std::int64_t>::value, void>::type
       loadValue( T & t ){ loadLong(t); }
 
       //! Serialize an unsigned long if it would not be caught otherwise
       template <class T> inline
       typename std::enable_if<std::is_same<T, unsigned long>::value &&
-                              !std::is_same<T, std::uint32_t>::value &&
+                              sizeof(T) >= sizeof(std::uint64_t) &&
                               !std::is_same<T, std::uint64_t>::value, void>::type
       loadValue( T & t ){ loadLong(t); }
       #endif // _MSC_VER
