pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Patch for libdvdread-4.1.3 on DragonFly


        The patch below (submitted upstream too) is sufficient to make
libdvdread-4.1.3 compile and work on DragonFlyBSD.

--- src/bswap.h.orig    2009-02-23 09:39:57 +0000
+++ src/bswap.h
@@ -65,6 +65,12 @@
 #define B2N_32(x) x = be32toh(x)
 #define B2N_64(x) x = be64toh(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

Steve O'Hara-Smith                          |   Directable Mirror Arrays
C:>WIN                                      | A better way to focus the sun
The computer obeys and wins.                |    licences available see
You lose and Bill collects.                 |

Home | Main Index | Thread Index | Old Index