$NetBSD: patch-ae,v 1.1.1.1 2011/01/08 20:43:39 markd Exp $ Byte order defines for other than linux --- lib/md5.c.orig 2010-03-18 22:11:23.000000000 +0000 +++ lib/md5.c @@ -14,7 +14,20 @@ * needed on buffers full of bytes, and then call MD5Final, which * will fill a supplied 16-byte array with the digest. */ +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) +#include +#define __BYTE_ORDER _BYTE_ORDER +#define __LITTLE_ENDIAN _LITTLE_ENDIAN +#define __BIG_ENDIAN _BIG_ENDIAN +#elif defined(__APPLE__) +#include +#include +#define __BYTE_ORDER BYTE_ORDER +#define __LITTLE_ENDIAN LITTLE_ENDIAN +#define __BIG_ENDIAN BIG_ENDIAN +#else #include +#endif #include /* for memcpy() */ #include "md5.h"