pkgsrc/audio/xanalyser/patches/patch-aa
2005-12-11 20:46:50 +00:00

31 lines
949 B
Text

$NetBSD: patch-aa,v 1.3 2005/12/11 20:46:50 joerg Exp $
--- src/pcm.cc.orig 2005-12-11 20:35:40.000000000 +0000
+++ src/pcm.cc
@@ -9,6 +9,8 @@
#include <stdlib.h>
#ifdef __NetBSD__
# include <machine/byte_swap.h>
+#elif defined(__DragonFly__)
+# include <sys/endian.h>
#else
# include <byteswap.h>
#endif
@@ -122,7 +124,7 @@ PCM::swap_buffer (void* buffer, int fram
case S16: {
int16_t* tmp_buffer = (int16_t*) buffer;
for (int i = n; i != 0; i--) {
-#ifdef __NetBSD__
+#if defined(__NetBSD__) || defined(__DragonFly__)
*tmp_buffer = bswap16 (*tmp_buffer);
#else
*tmp_buffer = bswap_16 (*tmp_buffer);
@@ -134,7 +136,7 @@ PCM::swap_buffer (void* buffer, int fram
case S32: {
int32_t* tmp_buffer = (int32_t*) buffer;
for (int i = n; i != 0; i--) {
-#ifdef __NetBSD__
+#if defined(__NetBSD__) || defined(__DragonFly__)
*tmp_buffer = bswap32 (*tmp_buffer);
#else
*tmp_buffer = bswap_32 (*tmp_buffer);