From 6fc2c88210780982b67f9b7a053663fecf4b2621 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 8 Dec 2008 11:12:30 +0100 Subject: [PATCH] lib: add __BYTE_ORDER to md5.c Signed-off-by: Karel Zak --- lib/md5.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/md5.c b/lib/md5.c index a78eec46..30698451 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -14,11 +14,16 @@ * needed on buffers full of bytes, and then call MD5Final, which * will fill a supplied 16-byte array with the digest. */ +#include #include /* for memcpy() */ #include "md5.h" -#ifndef HIGHFIRST +#if !defined __BYTE_ORDER || !(__BYTE_ORDER == __LITTLE_ENDIAN) && !(__BYTE_ORDER == __BIG_ENDIAN) +#error missing __BYTE_ORDER +#endif + +#if (__BYTE_ORDER == __LITTLE_ENDIAN) #define byteReverse(buf, len) /* Nothing */ #else void byteReverse(unsigned char *buf, unsigned longs); -- 2.39.5