From 0ae45f5f469945fd6f9328f6d772f3cc4804d9e4 Mon Sep 17 00:00:00 2001 From: Jose Fonseca Date: Fri, 6 May 2016 11:15:26 +0100 Subject: [PATCH] crc32c: Update endian logic from upstream. Fixes Mac OS X build. --- thirdparty/crc32c/crc32c.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/thirdparty/crc32c/crc32c.hpp b/thirdparty/crc32c/crc32c.hpp index a2e4c001..e22b57fe 100644 --- a/thirdparty/crc32c/crc32c.hpp +++ b/thirdparty/crc32c/crc32c.hpp @@ -31,8 +31,14 @@ #include #include -#ifndef _WIN32 -#include +// define endianess and some integer data types +#if defined(_WIN32) + #define __LITTLE_ENDIAN 1234 + #define __BIG_ENDIAN 4321 + #define __BYTE_ORDER __LITTLE_ENDIAN +#else + // defines __BYTE_ORDER as __LITTLE_ENDIAN or __BIG_ENDIAN + #include #endif