From b37bd6ce5c345f26f8e090355cdaf25ec4219609 Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Wed, 26 Feb 2014 19:21:40 +0100 Subject: [PATCH] Fix endian detection on non-linux systems f975f736408f32e7384cf38270a7806e68d5e112 introduced inclusion of endian.h, which is not a standard header. Only include it on Linux machines and add similar includes for Apple and FreeBSD. --- lib/sha-1.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/sha-1.c b/lib/sha-1.c index 7212dd69..e0ab4dc0 100644 --- a/lib/sha-1.c +++ b/lib/sha-1.c @@ -63,7 +63,14 @@ typedef unsigned __int64 u_int64_t; #include #include #include + +#if defined(__APPLE__) +#include +#elif defined(__FreeBSD__) +#include +#elif defined(__linux__) #include +#endif #if !defined(BYTE_ORDER) # define BYTE_ORDER __BYTE_ORDER