$NetBSD: patch-ad,v 1.6 2014/06/09 12:34:26 ryoon Exp $

--- speaker-test/speaker-test.c.orig	2013-07-09 15:28:37.000000000 +0000
+++ speaker-test/speaker-test.c
@@ -44,7 +44,16 @@
 #include <getopt.h>
 #include <inttypes.h>
 #include <ctype.h>
+#if defined(__NetBSD__) || defined(__DragonFly__)
+#include <sys/endian.h>
+#define ESTRPIPE EPIPE
+#elif defined(__sun)
+#include <sys/byteorder.h>
+#define bswap_16 BSWAP_16
+#define bswap_32 BSWAP_32
+#else
 #include <byteswap.h>
+#endif
 #include <signal.h>
 
 #define ALSA_PCM_NEW_HW_PARAMS_API
