[libdvdnav-devel] Add DragonFly BSD support for bswap*().

Thomas Klausner git at videolan.org
Wed Oct 1 14:54:34 CEST 2014


libdvdread | branch: master | Thomas Klausner <wiz at NetBSD.org> | Wed Oct  1 14:39:00 2014 +0200| [654d4221884dd0ef03f04b9e2afd90ec4f3c743f] | committer: Jean-Baptiste Kempf

Add DragonFly BSD support for bswap*().

Signed-off-by: Thomas Klausner <wiz at NetBSD.org>
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/libdvdread.git/?a=commit;h=654d4221884dd0ef03f04b9e2afd90ec4f3c743f
---

 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



More information about the libdvdnav-devel mailing list