pkgsrc/devel/libblkid/patches/patch-ae
markd a22548c643 Initial import libblkid 2.18
The libblkid library is used to identify block devices (disks) as to their
content (e.g. filesystem type) as well as extracting additional information
such as filesystem labels/volume names, unique identifiers/serial numbers, etc.
A common use is to allow use of LABEL= and UUID= tags instead of hard-coding
specific block device names into configuration files.

From util-linux-ng.
2011-01-08 20:43:38 +00:00

27 lines
823 B
Text

$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"