Files
2013-09-26 17:14:40 +02:00

28 lines
823 B
Plaintext

$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 <sys/endian.h>
+#define __BYTE_ORDER _BYTE_ORDER
+#define __LITTLE_ENDIAN _LITTLE_ENDIAN
+#define __BIG_ENDIAN _BIG_ENDIAN
+#elif defined(__APPLE__)
+#include <machine/endian.h>
+#include <libkern/OSByteOrder.h>
+#define __BYTE_ORDER BYTE_ORDER
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#define __BIG_ENDIAN BIG_ENDIAN
+#else
#include <endian.h>
+#endif
#include <string.h> /* for memcpy() */
#include "md5.h"