[libdvdnav-devel] libdvdread support for Dragonfly BSD
Thomas Klausner
tk at giga.or.at
Wed Oct 1 14:40:26 CEST 2014
On Wed, Oct 01, 2014 at 02:33:32PM +0200, Jean-Baptiste Kempf wrote:
> On 01 Oct, Thomas Klausner wrote :
> > Can you please integrate this?
>
> Of course.
> Can you provide a git formatted patch?
Sure! Is the attached patch ok?
Thomas
-------------- next part --------------
>From 08c6e4f4317b79f7da5f9a57a3d18d3417e359a1 Mon Sep 17 00:00:00 2001
From: Thomas Klausner <wiz at NetBSD.org>
Date: Wed, 1 Oct 2014 14:39:00 +0200
Subject: [PATCH] Add DragonFly BSD support for bswap*().
Signed-off-by: Thomas Klausner <wiz at NetBSD.org>
---
src/bswap.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/bswap.h b/src/bswap.h
index fdf53dc..6258f88 100644
--- a/src/bswap.h
+++ b/src/bswap.h
@@ -73,6 +73,12 @@
#define B2N_32(x) x = ENDIAN_RET32(x)
#define B2N_64(x) x = ENDIAN_RET64(x)
+#elif defined(__DragonFly__)
+#include <sys/endian.h>
+#define B2N_16(x) x = bswap16(x)
+#define B2N_32(x) x = bswap32(x)
+#define B2N_64(x) x = bswap64(x)
+
/* This is a slow but portable implementation, it has multiple evaluation
* problems so beware.
* Old FreeBSD's and Solaris don't have <byteswap.h> or any other such
--
2.1.0
More information about the libdvdnav-devel
mailing list